
EntityFramework
Data annotation attributes were introduced in .NET 3.5 as a way to add validation to classes used by ASP.NET applications. Since that time , RIA Services has begun using data annotations and they are now part of Silverlight . Code First allows you to build an EDM Entity Framework model using code (C# or VB.NET) and is now in its third CTP .
Data Annotations in the Entity Framework and Code First - Entity Framework Design
EF 4.1 Code First Walkthrough - ADO.NET team blog
The information in this post is out of date. Visit msdn.com/data/ef for the latest information on current and past releases of EF. For Code First to a New Database see http://msdn.com/data/jj193542 For Code First to an Existing Database see http://msdn.com/data/jj200620Faking DbContext in Entity Framework 4.1 with a generic repository « REFACTOR (this)
Update 30/11/2011: FakeDbSet implementation update Please see the new and improved FakeDbSet Here Update 16/06/2011: Added step (2) description of how to implement Set<>() method in your original DbContext so that it returns IDbSet<>. Also added SaveChanges() to expose the context as a unit of work. + A little reorganisation. Faking of the new Entity Framework 4.1 DbContext can be done quite simply by following these steps: 1. Create a common interface for your particular DbContext type.Repository Pattern with Entity Framework 4.1 and Code First
Julie Lerman March 2011 Watch a video of this content Download the code for this article: Microsoft’s ADO.NET Entity Framework (EF) simplifies data access by allowing you to avoid working directly with the database in your code. Instead you can retrieve data by writing queries against strongly typed classes letting the Entity Framework handle the database interaction on your behalf.
Building an MVC 3 App with Model First and Entity Framework 4.1
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.] In this task, you will create strongly-typed queries against the CLR objects that represent entities and associations in the School model, and bind display controls to the object collections returned from these queries. At the beginning of the code file for the CourseViewer form, add the following using (C#) or Imports (Visual Basic) statements to reference the model created from the School database and the entity namespace.

