internal override void SeedDatabase() { Debug.Assert(!_calledByCreateDatabase); using (var context = _usersContextInfo.CreateInstance()) { _configuration.OnSeed(context); context.SaveChanges(); } }
internal override void SeedDatabase() { // Context may not be constructable when Migrations is being called by DbContext CreateDatabase // and the config cannot have Seed data anyway, so avoid creating the context to seed. if (!_calledByCreateDatabase) { using (var context = _usersContextInfo.CreateInstance()) { _configuration.OnSeed(context); context.SaveChanges(); } } }