This recipe is an implementation of the repository pattern which allows us to separate the usage of a database and its data from the act of reading that data.
We will be using NuGet Package Manager to install the Entity Framework 4.1 assemblies.
The package installer can be found at http://www.nuget.org/.
We will also be using a database for connecting to and updating data.
Open the Repository Pattern solution in the included source code examples.
Execute the database setup script from the code samples included with this recipe. This can be found in the
DataAccess project within the
DataAccessproject, add a new C# interface name
IBlogRepositorywith the following ...