Unable to register DbConnection with Unity and Entity Framework
问题 I am not at all sure what the underlying problem is that is causing this exception. I am using ASP.NET MVC, with Unity.Mvc, and Entity Framework 6. I have the following code to register my repositories: public static void RegisterTypes(IUnityContainer container) { // NOTE: To load from web.config uncomment the line below. Make sure to add a Microsoft.Practices.Unity.Configuration to the using statements. // container.LoadConfiguration(); // TODO: Register your types here // container