I
I
Indiefishman2014-05-31 18:21:55
ASP.NET
Indiefishman, 2014-05-31 18:21:55

CodeFirst DB migration issues. EF 6.0.0.0?

There was a problem when trying to extend IdentityUser , in an already running project.
Extension code:

public class ApplicationUser : IdentityUser
    {
        public string NameOfUser { get; set; }
    }

Add-Migration "NameOfUser" and Update-Database are executed without errors, the field is created in the database, but when trying to access the database, an error occurs. Those. any action of the standard AccountController results in an error:
Migration for context 'ApplicationDbContext' is enabled, but the database does not exist or has no mapped tables. Create a database and tables in it using migrations. For example, you can run the "Update-Database" command from the Package Manager Console to do this.

Version EF 6.0.0

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question