Re: Type convertsion from string



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.


.


Loading