INNER CODE UNIT · C#
Stars
mongodb/mongo-efcore-provider · benchmarks/MongoDB.EntityFrameworkCore.Benchmarks/BenchmarkSeeder.cs:36
Stars = (i % 5) + 1,
ProductId = products[i % products.Count].Id
});
}
ctx.SaveChanges();
}
public static void SeedExtended(BenchmarkDbContext ctx, int accountCount, int orderCount, int wideCount)
{
ctx.Database.EnsureCreated();
var accounts = new List<Account>(accountCount);
for (var i = 0; i < accountCount; i++)
{
var a = new Account { Name = "account-" + i, Tier = (i % 3) == 0 ? "gold" : "standard" };
accounts.Add(a);
ctx.Accounts.Add(a);
}