We end up with an error message "No context type was found in the assembly '{assembly.dll}'." when trying to execute a Package Manager Console command "enable-migrations".
This is because there is no database context class exists.
So all we need to create a new class with any name and inherit that with "System.Data.Entity.DbContext".
Now execute the command "enable-migrations" again. This time it should enable it.
Simple though!
This is because there is no database context class exists.
So all we need to create a new class with any name and inherit that with "System.Data.Entity.DbContext".
Now execute the command "enable-migrations" again. This time it should enable it.
Simple though!
No comments:
Post a Comment