I know that similar questions have been asked before.
I start with a set of xsd-generated data objects (plus the db model), and you need to keep these almost 1: 1 in the same SQL Server database. The number of objects is small (10), and the logic required to insert / update / delete db (mainly upserts) is subtle (albeit some).
I am wondering which approach is best?
- no ORM with SQL Server stored processes, probably generated using T4 or something like codeSmith
- Entity Fx, generate entities from Db and manually map xsd entities to EFx objects at runtime
- Entity Fx, create an edmx file from the database, then use the POCO approach and directly save the xsd-generated objects (after manually encoding the ObjectContext class, which I assume)
- code-only EFx approach (looks like one of the most idiotic ideas I've ever seen)
- anything else?
I am particularly interested in maintenance - what happens if a property is added to objects generated by XSD, how much effort each approach takes.
I would have a desire to go with 1, since the logic is subtle and there are no complex mappings (m: n). But it would be possible that the data model would evolve into a more complex domain model, and we do not want to overestimate anything.
How bad is each EFx approach harmful to runtime performance?
ToxicAvenger