I\'m quite new to EF. I\'m trying to override a Seed
method inside my custom initializer, using MVC 4.
The problem is when EF creates the database, i don\'
You are not saving your changes to the database. Note that the default implementation of Seed does nothing.
Try adding a call to SaveChanges in your Seed.
protected override void Seed(EFDbContext context)
{
context.Admins.Add(new Admins
{
Username = "admin",
Password = "admin123456",
});
base.Seed(context);
context.SaveChanges();
}