This is about some confusion I have about some of the entity framework material I have found from here: https://www.asp.net/
On this Page it explains how to wrap a dbcontext using a repository and to wrap a repository using a a unit of work class: http://www.asp.net/mvc/overview/older-versions/getting-started-with-ef-5-using-mvc-4/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application
However, on this page it states that a dbcontext is already a combination of both the UOW pattern and the repository pattern: https://msdn.microsoft.com/en-us/library/system.data.entity.dbcontext(v=vs.103).aspx
So if the problem that these patterns solve are already solved by dbcontext, why re-implement these patterns with EF5?
Also, in the tutorial, the UnitOfWork class doesn't seem to show any benefit that UOW is supposed to give. for instance it states: "That way, when a unit of work is complete you can call the SaveChanges method on that instance of the context and be assured that all related changes will be coordinated. "
but all it seems to do is wrap the dbcontext for no reason. I think I am missing something. I don't see any co-ordination in this implementation... And how do thing "rollback" if something goes wrong?