RSS

Entity Framework: First Impressions

04 Jul

I have been working my way through Julie Lerman‘s book ‘Programming Entity Framework‘ (review to follow) in order to evaluate the technology. On the face of it it seemed the perfect replacement for part of our existing solution that leveraged, the rather delapidated, SQLXml.

The concepts and patterns of the model seem absolutely spot on – very encouraging. However…
The EDM UI Designer that Microsoft has shipped is not even Beta 1. It seems that every change / customisation I make to my model is accompanied by a caveat. For example:
  • “Remember that if you make the base class abstract and then extend it you’ll receive a compilation error. That’s OK.”
  • “If you want a ‘0 or 1’-to-Many relationship, first add it as a 1-Many, then setup your mappings then, finally, change the relationship back. Otherwise the designer breaks.”
  • “You’ll need to manually edit the SSDL Xml for this to work.”
One of the really neat features of EF is the way it will sync with any changes to your underlying data source. Unfortunately, any manual changes you make to the conceptual layer are lost every time you update the model!
Secondly, the automatic code-behind generation leaves much to be desired. I think I read that this can be re-configured, but I shouldn’t have to. Each Entity comes with its own Factory method. I would like this in a separate, static class please. I would also like it to instantiate a Builder class to do the work.
Finally, the exceptions. I appreciate that I am new to the framework but the errors (normally relating to Mapping Fragments) require the developer to wade through xml. Not good.
Overall, I want to use this framework but I’m loathed to give it the thumbs up. Hopefully, VS2010 will have a working designer?
Advertisements
 
Leave a comment

Posted by on July 4, 2009 in C#

 

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: