public override void TestInitialize() { base.TestInitialize(); var options = new DbContextOptionsBuilder <SportClubDbContext>().UseInMemoryDatabase("TestDb").Options; var c = new SportClubDbContext(options); obj = new TestClass(c, c.Trainings); }
public override void TestInitialize() { var options = new DbContextOptionsBuilder <SportClubDbContext>() .UseInMemoryDatabase("TestDb") .Options; db = new SportClubDbContext(options); dbSet = ((SportClubDbContext)db).CoachesOfTrainings; obj = new CoachOfTrainingsRepository((SportClubDbContext)db); base.TestInitialize(); }
public override void TestInitialize() { base.TestInitialize(); var options = new DbContextOptionsBuilder <SportClubDbContext>() .UseInMemoryDatabase("TestDb") .Options; var c = new SportClubDbContext(options); obj = new TestClass(c, c.Trainings); count = GetRandom.UInt8(20, 40); foreach (var p in c.Trainings) { c.Entry(p).State = EntityState.Deleted; } AddItems(); }
internal void InitializeTables(ModelBuilder builder) => SportClubDbContext.InitializeTables(builder);
public ParticipantOfTrainingsRepository(SportClubDbContext c) : base(c, c?.ParticipantsOfTrainings) { }
public CoachesRepository(SportClubDbContext c) : base(c, c.Coaches) { }
public ParticipantsRepository(SportClubDbContext c) : base(c, c.Participants) { }
public TrainingsRepository(SportClubDbContext c) : base(c, c.Trainings) { }
public CoachOfTrainingsRepository(SportClubDbContext c) : base(c, c?.CoachesOfTrainings) { }