private static void SeedUsers(NotifikationContext context) { if (!context.Users.Any()) { var countries = new List <UserEntity>() { new UserEntity() { Email = "*****@*****.**", Name = "Test", Id = 1 }, new UserEntity() { Email = "*****@*****.**", Name = "Test2", Id = 2 }, new UserEntity() { Email = "*****@*****.**", Name = "Test3", Id = 3 } }; context.AddRange(countries); context.SaveChanges(); } }
public static void Seed(this NotifikationContext context) { SeedUsers(context); context.SaveChanges(); }