User1711366110 posted
hi qiudong,
As per your case ,the following links which may guide you to resolve this case :
1.
Click here to get sample code with explanation about Repository Pattern and Unit of Work with Entity Framework in ASP.NET MVC
2.
Click here to get sample code with explanation from similar thread Entity Framework 6 and Unit Of Work… Where, When transactions in ado.net
--
with regards,
Edwin