RSS

Monthly Archives: July 2009

Current Reading List

These are the books I currently have open (on my desk, on my floor, on the window sill – you get the picture)…

Not enough hours in the day!
Advertisements
 
Leave a comment

Posted by on July 8, 2009 in Uncategorized

 

Tags:

Entity Framework: First Impressions

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?
 
Leave a comment

Posted by on July 4, 2009 in C#

 

Tags: , ,