I am making a ASP.NET MVC project …when i type enable-migrations i get the following eroors:
More than one context type was found in the assembly 'eManager.Web'.
To enable migrations for eManager.Web.Infrastructure.DepartmentDb, use Enable-Migrations -ContextTypeName eManager.Web.Infrastructure.DepartmentDb.
To enable migrations for eManager.Web.Models.UsersContext, use Enable-Migrations -ContextTypeName eManager.Web.Models.UsersContext.
The error message exactly states what the problem is and what needs to be done – including the command that needs to be issued. Apparently there is more than one context in your project (Web.Infrastructure.DepartmentDb and Web.Models.UsersContext) and migrations does not know for which of these migrations should be enabled. You need to point to the context type. As per the error message use:
to enable migrations for eManager.Web.Infrastructure.DepartmentDb or
to enable migrations for eManager.Web.Models.UsersContext