Reputation: 23
Run the command Enable-Migrations
Add-Migration X
with X being whatever name you want to give this migration
But After this migration if i create any new Table why its not Generated in db
Upvotes: 1
Views: 2102
Reputation: 251
after creating your class need to set the table in the dbcontext like:
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public DbSet<User> User {get;set;}
}
public class User
{
[key]
public int id {get;set;}
public string name {get;set;}
}
create the migration and update the database
Upvotes: 1