Hi,
If I already have domain classes, and I want to be able persist them using EF via a model first approach how do I do this?
For example do I go to the EF designer (in VS2010) and create the model and generate the classes, then go to these EF classes and somehow manually modify them? But then would there be an issue if I needed to change the model and re-create database TSQL from the model for updates?
What's the easiest approach?
EDIT - In my case I've got some base classes that do graph navigation - I was hoping I could leave (a) my graph traversal routines in the business logic assembly, e.g. NodeBase, RelationshipBase etc, and then (b) have my EF persistance in a separate EF assembly. Any advice on this specific scenario I have?
EDIT 2 - Actually I note I note the following template options from "Add Code Generation Item.."
- ADO.NET C# POCO Entity Generator Template - Online
- ADO.NET Self-Tracking Entity Generator - Local
- ADO.NET Entity Object Generator
I'm guessing the #3 one is the default that comes with VS2010. Anyone across #1 and #2 and which might be best to assist in my goal? i.e. Having an existing set of domain classes with methods that already inherit from other classes (i.e. noting with the current EF generated entity classes they seem to already have to inherit from EntityObject)