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.