Entity Framework Patterns: Identity Map(rlacovara.blogspot.com)

submitted by rlacovararlacovara(60) 2 years, 10 months ago

ADO.Net Entity Framework is a different way of looking at persistence than most of us are used to. It wants us to do things like add objects/entities to our data context instead of saving them, then it doesn’t save those objects to the database until we call SaveChanges(). We don’t directly save specific entities but instead EF tracks the entities we’ve loaded and then saves changes to db for any entities that it thinks have changed. My first reaction when I realized how different these concepts were from my standard way of saving data was that I hated it (this actually took place with LINQ to SQL which I still don’t care for due to the way it handles sprocs). But the promise of rapid application development and more maintainable code kept me coming back. I started reading up on architectures using ORMs (mostly in the Java world) and I discovered that most of the things I initially didn’t like about Entity Framework and LINQ to SQL are actually accepted design patterns from the ORM world that have been developed by people much smarter than me who have been working for years to solve the Impedance Mismatch problem. So I thought it might be helpful to talk about some of these patterns and how they are handled by Entity Framework. The first one we’ll look at is Identity Map.

add a comment |category: |Views: 72

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story