I am creating an application with ASP.NET MVC and Entity framework code first. I am using repository and unit of work pattern with influence of from following link.
The Unit of Work pattern is already implemented in Entity Framework.
The DbContext is your Unit of Work. Each IDbSet is a Repository.
using (var context = new SchoolContext()) // instantiate our Unit of Work { var department = context.Departments.Find(id); }