public static void SeedData(StudentsContext context) { if (!context.Students.Any()) { context.Students.Add(new Student { FirstName = "Ahmed", LastName = "Sherien", NationalId = "1122334455667788", Email = "*****@*****.**" }); context.SaveChanges(); } }
public static void InitializeDatabase(StudentsContext context) { context.Database.Migrate(); }