public LocationRepository(EggProductionDbContext ctx)
 {
     if (ctx == null)
     {
         throw new NullReferenceException();
     }
     _ctx = ctx;
 }
Пример #2
0
        public void EggProductionDbContext_ShouldHaveDbSetWithLocations()
        {
            var context = new EggProductionDbContext();

            context.Locations.Should().BeAssignableTo <DbSet <Location> >();
        }
Пример #3
0
        public void EggProductionDbContext_IsOfTypeDbContext()
        {
            var context = new EggProductionDbContext();

            context.Should().BeAssignableTo <DbContext>();
        }
 public LocationRepository GetLocationRepository(EggProductionDbContext context)
 {
     return(new LocationRepository(context));
 }
Пример #5
0
 public LocationRepository(EggProductionDbContext ctx)
 {
     _ctx = ctx ?? throw new NullReferenceException();
 }