コード例 #1
0
ファイル: RoomsController.cs プロジェクト: Atitay/ABHotel
        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);
 }