How do you setup your EF EDM? (Entity Framework)

  • Thread starter Thread starter THJ
  • Start date Start date
T

THJ

Hi.

I was wondering how you people setup your EDM?
Are you using the edmgen tool, the Visual Studio designer or are you
writing them manually?

I'm asking because I'm considering writing my EDM manually instead of
using the designers because I don't like auto generated code. How
difficult is it writing it manually? Can you compare it to writing
NHibernate mapping files?

Thanks in advance.
Tommy.
 
There is alot of code to write if you do it manually, you need several
attributes, a base class and to raise some events from the setter to get
the full functionality of the Entit Framework.

My general recommendation is that if the modelling capabilities of the
designer is sufficient use that, if you need more advanced modelling
like ComplexType, you should write your own csdl file and run edmgen on it.

Compared to hbm files from NHibernate they are a bit more complex to
write. NH encapsulates everything in one XML vocabular while EDM needs
three seperate for different concepts, one for the conceptual model
definition, one for the storage schema and one for the mapping between
the conceptual and storage models.

I hope this helps.

--
Patrik Löwendahl
http://www.lowendahl.net
[MVP] [MCT - Enterprise Application Development]

THJ skrev:
 
Back
Top