I need to save and load properties of a Class dynamicly, but what is the best practis for this ?
I have for now, two classes that I need to save.
public abstract class BaseComponent {
protected int ComponentID { get; set; }
protected string ComponentName { get; set; }
protected Dictionary GetAllProperties{) { /* Reflection */ }
}
public class Article : BaseComponent {
protected string Title { get; set; }
protected string Content { get; set; }
}
Here I'm thinking to table:
Table: Component, ComponentID, Parrent -> and more Table: ComponentProperties: ComponentID, Key, Value -> and more
I need to use as must of the dotNet framework, but still keep it simpel. Im think og use a Provider, I need the function og make different data provider:thatcan save to xml file, sql database or oracle database, you name it.
Do I use a provider, or somethnig else ?