public AdressProvider() { EFContext context = new EFContext(); _citiesRepository = new CitiesRepository(context); _districtsRepository = new DistrictsRepository(context); _streetsRepository = new StreetsRepository(context); _numberHomeRepository = new NumberHomeRepository(context); _roomsRepository = new RoomsRepository(context); }
public RoomProvider() { EFContext context = new EFContext(); _adressProvider = new AdressProvider(); _roomsRepository = new RoomsRepository(context); _roomImagesRepository = new RoomImagesRepository(context); _numberHomeRepository = new NumberHomeRepository(context); // var i = _roomsRepository.GetAll().ToList(); //var list = _roomsRepository.GetAll() // .Include(b => b.tblNumbersHomes) // .Include(s => s.tblNumbersHomes.tblStreets) // .Include(cr => cr.tblNumbersHomes.tblStreets.tblDistricts) // .Include(c => c.tblNumbersHomes.tblStreets.tblDistricts.tblCities) // .Select(r => new // { // RommNumber=r.NumberRoom, // Street=r.tblNumbersHomes.tblStreets.Name // }); }