EF7 migration in Pluralsight course

entity-framework-core migration

Question

Is anyone else having problems with the second migration in Shawn Wildermuth's Pluralsight course "Building a Web App with ASP.NET Core RC1, MVC 6, EF7 & AngularJS"?

Specifically, the command

dnx ef migrations add IdentityEntities

causes this exception:

GenericArguments[0], 'TheWorld.Models.IWorldRepository', on 'Microsoft.Data.Entity.Infrastructure.IDbContextFactory`1[TContext]' violates the constraint of type 'TContext'.

The first migration and database creation seemed to go fine, so I'm not sure what's causing this.

1
4
4/21/2016 5:08:05 PM

Popular Answer

I just fixed this by deleting the entire Migrations folder from Solution Explorer. I am not sure exactly what causes this error, but I think if you name your migrations the same thing (IdentityEntities in your case) the problem is likely to occur.

6
7/18/2016 1:05:58 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow