internal void initializeTables(ModelBuilder builder) { RoadFreightDbContext.InitializeTables(builder); SeaFreightDbContext.InitializeTables(builder); AirFreightDbContext.InitializeTables(builder); OrderDbContext.InitializeTables(builder); }
public override void TestInitialize() { base.TestInitialize(); var options = new DbContextOptionsBuilder <AirFreightDbContext>().Options; var c = new AirFreightDbContext(options); obj = new testClass(c, c.America); }
public void TestInitialize() { type = typeof(AirFreightDbInitializer); var options = new DbContextOptionsBuilder <AirFreightDbContext>() .Options; db = new AirFreightDbContext(options); AirFreightDbInitializer.Initialize(db); }
public override void TestInitialize() { var options = new DbContextOptionsBuilder <AirFreightDbContext>() .Options; db = new AirFreightDbContext(options); dbSet = ((AirFreightDbContext)db).China; obj = new ChinaRepository((AirFreightDbContext)db); base.TestInitialize(); }
public override void TestInitialize() { base.TestInitialize(); var options = new DbContextOptionsBuilder <AirFreightDbContext>() .Options; var c = new AirFreightDbContext(options); obj = new TestClass(c, c.America); data = GetRandom.Object <AmericaData>(); }
public override void TestInitialize() { base.TestInitialize(); var options = new DbContextOptionsBuilder <AirFreightDbContext>() .Options; var c = new AirFreightDbContext(options); obj = new testClass(c, c.America); count = GetRandom.UInt8(20, 40); foreach (var p in c.America) { c.Entry(p).State = EntityState.Deleted; } addItems(); }