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);
        }
Exemplo n.º 2
0
        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
            //    });
        }