ASP.NET Identity migrations issues with MySQL and EF6

asp.net-identity asp.net-mvc c# entity-framework-6 mysql

Accepted Answer

The issue here, in my opinion, is that yourSolutionContext does not have a default constructor, andCreate method.

You ought to alter yourSolutionContext to resemble what is shown here:

public class SolutionContext: IdentityDbContext<User>
{
    public DbSet<LanguageTest> LanguageTests { get; set; }
    public DbSet<Certificate> Certificates { get; set; }

    public SolutionContext()
        : base("SolutionContext", throwIfV1Schema: false)
    {
    }

    public static SolutionContext Create()
    {
        return new SolutionContext();
    }
}
1
2/25/2016 12:47:36 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