https://docs.microsoft.com/en-us/aspnet/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 https://docs.microsoft.com/en-us/ef/core/saving/transactions http://www.cnblogs.com/1zhk/p/5309043.html http://www.cnblogs.com/xishuai/p/3750154.html 转载于:https://www.cnblogs.com/wswind/p/10710598.html