示例#1
0
        public RoomsController(ApplicationDbContext db, HostingEnvironment hostingEnvironment)
        {
            _db = db;
            _hostingEnvironment = hostingEnvironment;
            roomRep             = new RoomRep(_db);
            roomTypesRep        = new RoomTypesRep(_db);

            RoomVM = new RoomsViewModel()
            {
                RoomTypes = roomTypesRep.GetRoomTypes,
                Rooms     = new Models.Rooms()
            };
        }
示例#2
0
 public RoomTypesController(ApplicationDbContext db)
 {
     _db          = db;
     roomTypesRep = new RoomTypesRep(_db);
 }