public void TestGetDrivers() { var options = new DbContextOptionsBuilder <DgtDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; var context = new DgtDbContext(options); context.Database.EnsureCreated(); DgtDbInitializer.Initialize(context); DriverRepository driverRepository = new DriverRepository(context); DriverService driverService = new DriverService(driverRepository); var drivers = driverService.GetDrivers(); Assert.True(drivers.Count() == 2); }
public VehicleInfractionRepository(DgtDbContext context) : base(context) { }
public VehicleDriverRepository(DgtDbContext context) : base(context) { }
public EntityBaseRepository(DgtDbContext context) { _context = context; }