For a project, I need to store an entity (and all entities that are assigned as properties) in a single file. I figured I could just store it in a sqlserverce db file, but I'm unable to find a way to 'copy' an object that I fetched from our 'real' sql server connection to the sql server ce db file, without copying the properties manually, recreating the child entities where needed. Is there really no easier way to store an entity to a single file? I need to store the entity, so I can transfer it over the internet. |
You can create DTO objects and use O2O mapping feature of DataObjects to "copy" content of "real" entities to DTO entities. You must write simple DTO classes with all properties as "real" do class and write O2O mapping builder to map "real" classes with DTO classes. Or you can wait for new version of DataObjects.Net Entity Model Designer (version 1.0.5.0) which will contain new feature to generate DTO classes from model also with generated "mapping builder" class. Then you can serialize those DTO classes with standard |
TimM, you could additionally take a look at WCF Data Services sample which is included into DataObjects.Net installer. |