Last post Nov 10, 2016 03:35 AM by _Alpha_
Nov 10, 2016 01:56 AM|_Alpha_|LINK
when i use ef code first migrations, I have error :more than one context type was found in the assembly "webapplication1",how to solve it and why it happens
Nov 10, 2016 02:20 AM|Nan Yu|LINK
more than one context type was found in the assembly "webapplication1"
The error means there is more than one context in your project 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 'YourContextWantToUse', use Enable-Migrations -ContextTypeName YourContextWantToUse.
Nov 10, 2016 03:35 AM|_Alpha_|LINK
OK,I will try this.