The entity type ApplicationUser is not part of the model for the current context. Used two different databases at beginning of project

asp.net-mvc asp.net-mvc-4 azure-web-sites entity-framework entity-framework-6

Accepted Answer

ZZZ_tmp
9
12/26/2016 8:17:47 AM

Popular Answer

The database name should be used in place of the connection string. the database name in my example, please.TestDB

public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
    {
        public ApplicationDbContext()
            : base("TestDB", throwIfV1Schema: false)
        {
        }

        public static ApplicationDbContext Create()
        {
            return new ApplicationDbContext();
        }
    }


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