You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
EntityFrameworkCore.Jet/test/EFCore.Jet.IntegrationTests/Model04/SeedHelper.cs

28 lines
565 B
C#

using System;
using System.Linq;
namespace EntityFrameworkCore.Jet.IntegrationTests.Model04
{
public static class SeedHelper
{
public static void SeedPersons(CarsContext Context)
{
if (Context.Persons.Count() != 0)
return;
for (int i = 0; i < 10; i++)
{
Context.Persons.Add(new Person()
{
Name = "PersonName " + (10 - i)
}
);
}
Context.SaveChanges();
}
}
}