public LocationRepository(EggProductionDbContext ctx) { if (ctx == null) { throw new NullReferenceException(); } _ctx = ctx; }
public void EggProductionDbContext_ShouldHaveDbSetWithLocations() { var context = new EggProductionDbContext(); context.Locations.Should().BeAssignableTo <DbSet <Location> >(); }
public void EggProductionDbContext_IsOfTypeDbContext() { var context = new EggProductionDbContext(); context.Should().BeAssignableTo <DbContext>(); }
public LocationRepository GetLocationRepository(EggProductionDbContext context) { return(new LocationRepository(context)); }
public LocationRepository(EggProductionDbContext ctx) { _ctx = ctx ?? throw new NullReferenceException(); }