A friend of mine, Rob Bagby, has started a training company that has some great stuff! Here is an example:
Every application we write accesses data from a database and in most of these apps, we want to work with our data as objects. In smaller, one-off apps, our object model can look very similar to our data model. However, in most cases, our object model looks vastly different.
We used to spend a lot of time writing "plumbing" code that allowed us to fetch data, materialize it as objects, as well as save changes to our objects back to the database. That should be a thing of the past. There are a host of technologies today that encapsulate this functionality and more: NHibernate, Entity Framework 4, LINQ to SQL, LLBLGen, etc. Entity Framework 4 is Microsoft's long-term solution in this space.
EF4 exposes a massive amount of features and services. Off the top of my head, some of these include the ability to:
- Create a model that maps to how your data is stored
- Implement advanced features in your model like inheritance
- Expose this model as different kinds of objects like: POCOs, Self-Tracking Entities or custom objects
- Load related objects via lazy loading or eager loading
- Integrate stored procedures for inserts, updates and deletes or for selects
- Automatically update your store with changes to your objects
- Handle concurrency, transactions, validation, etc.
EF4 handles all of these things and much more. But with all of these features comes complexity. The Entity Framework is huge and takes a large time commitment to understand… until now. Rob Bagby, a former teammate of mine, has released an online training class called "Understanding Entity Framework 4". In just a few short days, you can be exploiting the Entity Framework in your applications. If you are interested, Rob has given me a coupon code to distribute that will discount the price of the training from $499 to $299. The code is: UGYAOHI8 . Good luck!