Re: Type convertsion from string
- From: "Andrus" <kobruleht2@xxxxxx>
- Date: Wed, 17 Oct 2007 19:39:14 +0300
Marc,
To get this working, and to allow *some* kind of compile-time type-safety,
you'd need to use some kind of factory model, i.e.
---core code---
public abstract class SomeEntity {
public string Name {...} /// "regular" methods
public int Whatever {...}
static SomeEntity Create() {
... compiles if necessary, and returns a new SomeEntityImp()
}
}
---compile template---
public class SomeEntityImp : SomeEntity {
// ... additional properties (formulae) get inserted here
}
I'm planning to create "standard" entity assembly containing core properties
which are used from application code in stongly typed way.
This assembly is referenced from VS2005 projects.
At application start but before accesing entity classes, application
compiles new assembly containing additional properties which customers may
have added to server tables.
This eliminates need of factory pattern.
Andrus.
.
- Follow-Ups:
- Re: Type convertsion from string
- From: Marc Gravell
- Re: Type convertsion from string
- References:
- Type convertsion from string
- From: Andrus
- Re: Type convertsion from string
- From: Jon Skeet [C# MVP]
- Re: Type convertsion from string
- From: Andrus
- Re: Type convertsion from string
- From: Marc Gravell
- Re: Type convertsion from string
- From: Andrus
- Re: Type convertsion from string
- From: Marc Gravell
- Re: Type convertsion from string
- From: Andrus
- Re: Type convertsion from string
- From: Marc Gravell
- Re: Type convertsion from string
- From: Andrus
- Re: Type convertsion from string
- From: Marc Gravell
- Type convertsion from string
- Prev by Date: Re: Click Once app Update
- Next by Date: Re: Creating a Service that monitors the processes on the OS
- Previous by thread: Re: Type convertsion from string
- Next by thread: Re: Type convertsion from string
- Index(es):
Loading