Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!

Justin Etheredge is a Senior Consultant for Dominion Digital in Richmond, Virginia - United States. He likes to blog quite a bit at http://www.codethinked.com with hopes that someone out there might read it. When he isn't writing software or working on his computer... wait, he is always doing that. Anyways, Justin likes programming, a lot. Justin has posted 24 posts at DZone. View Full User Profile

Making the Entity Framework Fit Your Domain - Part 1

12.29.2008
Email
Views: 4301
  • submit to reddit

I'm assuming that like myself, many of you out there work for companies that base much of their IT infrastructure (or at least software development tools) around Microsoft products. So, when a new tool like the Entity Framework comes out, even if you are not a fan, you still need to have a solid knowledge of it because you are going to have to use it at some point. At this point most of my ORM experiences have been with NHibernate, but I still feel the need to explore the Entity Framework to see if I can make it palatable for me to use. I say "palatable" because of the fact that the Entity Framework is designed almost entirely around database first design, which is not the way that I like to design my applications.

My goal with this post is not to trash talk the entity framework, but instead to take it as far as I can toward a usable solution that I would be okay with putting into a production application. This post is going to be written as I explore, so please let me know if you see anything that is wrong or missing.

Let's first talk about the domain that we are getting ready to look at. It is going to be a very simple domain, because otherwise it would just overwhelm the blog post by introducing too much complexity. I do want to have enough entities though so that you can see where each technology differs. What we are going to do is start off with a scenario that everyone is familiar with... a user with groups and roles. The user will also have a list of addresses associated with it.

Read the rest of this post at CodeThinked.com

References
Published at DZone with permission of its author, Justin Etheredge. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

rajiv mathew replied on Thu, 2009/01/01 - 11:55pm

Hi Justin, Its just the exact article i was looking for. Is the second part of your aritcle published..... I am eagerly waiting for it.... I am trying to make a generic DAL with a generic quierybuilder ....somewhat like the ICriteria queries in nhibernate so that developers using my DAL would just have to pass the ICriteria query and the type of object to be returned.... the rest of the plumbing will be managed by my DAL

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.