示例#1
0
 public UnitOfWork(ICheckInRepository CheckInRepository, IClientsRepository ClientsRepository, ICommentsRepository CommentsRepository, IRoomsRepository RoomsRepository, IRoomImagesRepository RoomImagesRepository)
 {
     _CheckInRepository    = CheckInRepository;
     _ClientsRepository    = ClientsRepository;
     _CommentsRepository   = CommentsRepository;
     _RoomsRepository      = RoomsRepository;
     _RoomImagesRepository = RoomImagesRepository;
 }
示例#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
            //    });
        }
示例#3
0
 public UnitOfWork(IRoomsRepository RoomsRepository, IRoomImagesRepository RoomImagesRepository)
 {
     _RoomsRepository      = RoomsRepository;
     _RoomImagesRepository = RoomImagesRepository;
 }