public GenericRepository(IBalkanAirDbContext context) { if (context == null) { throw new ArgumentException("An instance of DbContext is required to use this repository.", "context"); } this.Context = context; this.DbSet = this.Context.Set <T>(); }
public SeedData(IBalkanAirDbContext context) { this.context = context; this.AircraftManufacturers = new List <AircraftManufacturer>(); this.SeedAircraftManufacturers(); this.Aircrafts = new List <Aircraft>(); this.SeedAircrafts(); this.TravelClasses = new List <TravelClass>(); this.SeedTravelClasses(); this.Countries = new List <Country>(); this.SeedCountries(); this.Airports = new List <Airport>(); this.SeedAirports(); this.FlightStatuses = new List <FlightStatus>(); this.SeedFlightStatuses(); this.Routes = new List <Route>(); this.SeedRoutes(); this.Fares = new List <Fare>(); this.SeedFares(); this.Flights = new List <Flight>(); this.SeedFlights(); this.FlightLegs = new List <FlightLeg>(); this.SeedFlightLegs(); this.LegInstances = new List <LegInstance>(); this.SeedLegInstances(); this.Notifications = new List <Notification>(); this.SeedNotifications(); this.Categories = new List <Category>(); this.SeedCategories(); this.News = new List <News>(); this.SeedNews(); }
public NumberGenerator(IBalkanAirDbContext context) { this.context = context; }