Simple repository for a small/medium sized ASP.NET MVC site
Keep your disposables short lived and you'll never have to implement IDisposable yourself. 

In other words, avoid keeping disposable objects as members. Always try to wrap them in a using statement. If you do that, you'll find that your Unit of Work doesn't need to be disposable. 



I can't ignore the obvious here though. There is no reason for any of this code to exist. It literally does nothing but pass through to the DbContext. Entity Framework is already a repository &amp; unit of work. 

That's not to say that you shouldn't hide the fact that you're using EF from your controller though. It's much better to create a domain specific API to decouple your controller from the persistence. In our projects we'll often have things like FooService.GetByName(string name) and FooService.GetMostRecent(int numberToRetrieve) kinds of methods. It makes for pleasant reading and easy implementation changes.