visual studio 2010 - Entity Framework - in model first, how do I get my EF classes to be based on the existing domain classes I have? -


If I already have domain classes, and I am able to use EF through the first approach of a model How can I do this?

For example, I will go to EF Designer (VS2010) and create models and generate classes, then go to these EF classes and modify them manually in some way?

What is the easiest way?

In my case - if I need to recreate the database from the model TSQL to change and update the model, will there be any problem? I have found some base classes that do graph navigation - I was hoping that I (A) can leave my graph traversal routine in the business logic assembly, e.g. Nodebase, Rationbase etc., and then (b) there is stability in my EF's different EF assemblies. Do I have any advice on this specific scenario?

Edit 2 - Actually I note that the following template option with "Add Code Generation Item."

  1. ADO.NET C # POCO unit generator Template - Online
  2. ADO .NET Self-Tracking Entry Generator - Local
  3. ADO. Net Entity Object Generator

I guess that # 3 is a default that comes with VS2010 # 1 and # 2 of anybody else to help in my goal, the best It is possible? That is, an existing set of domain classes with the methods of heir already before the existing classes (i.e. they are already inheriting EntityObject by paying attention to the current EF generated unit sections)

< P>

The revenue class is all partial, so if you have the same name space and one unit / class name then a model-with the first set units A group of existing classes Rg is quite easy. Simply put partially in your class and remove all the properties implemented by the entity framework generated code.


Comments