Hi All,
We have a number of custom classes that contain custom logic - each of these essentially map to a database (read:llblgen) entity. The custom logic class is essentially a super set of the llblgen entity class - however we cannot have a direct dependency upon it.
What we wish to do is to use the custom classes within the system and use the llblgen entity as our persistence layer.
We currently have a structure like this (hand written pseudo code)
public class Book : IDBPersist
{
public string BookName;
....
public void Persist()
{
MapObjectToEntity();
Entity.Save();
}
public Load()
{
Entity.Find();
MapEntityToObject();
}
}
I am wondering whether there is a better/more preferred method to do something like this.
Thanks,
Rob