private static void SeedUsers(AzureGalleryContext context) { string seedGendersPath = Path.Combine(SeedPath, "users.json"); if (File.Exists(seedGendersPath)) { context.Users.AddRange(JsonConvert.DeserializeObject <List <User> >(File.ReadAllText(seedGendersPath))); } }
public static void SeedData(this AzureGalleryContext context) { SeedUsers(context); context.SaveChanges(); }