public static async Task SeedAsync(ClothDbContext clothcontext) { if (!await clothcontext.Categories.AnyAsync()) { await clothcontext.Categories.AddRangeAsync( GetPreconfiguredItems()); await clothcontext.SaveChangesAsync(); }
public static async Task SeedAsync(ClothDbContext db) { if (!await db.Clothes.AnyAsync()) { await db.Clothes.AddRangeAsync( GetPreconfiguredItems()); await db.SaveChangesAsync(); }