I know similar questions have been asked before.
I am starting with a set of xsd-generated data objects (plus the db model is there) and need to persist these almost 1:1 to a single SQL Server database. The number of entities is small (10), and the logic required for the db insert/update/delete (mostly upserts) is thin (albeit there is some).
I am wondering which approach is best?
- no ORM with SQL Server stored procs, probably generated using T4 or something like codeSmith
- Entity Fx, generate entities from Db, and manually map the xsd entities to EFx entities at runtime
- Entity Fx, generate edmx file from DB, then use the POCO approach and directly persist the xsd-generated entities (after handcoding the ObjectContext derived class I suppose)
- code-only EFx approach (looks like one of the most idiotic ideas I have ever seen to me)
- anything else?
I am especially keen in terms of maintenance - what happens if a property is added to the XSD-generated entities, how much effort does each approach take.
I would be tempted to go with 1, since the logic is slim and there are no complex mappings (m:n). But it would be possible the Data model will evolve to a more complex domain model, and we don't want to reimplement anything then.
How bad does each of the EFx approaches hurt in terms of run-time performance?