// GET: ReservationController/Create
        public ActionResult Create()
        {
            var reservationTypes = _ReservationTyperepo.GetAll();
            var resrvTypesItems  = reservationTypes.Select(x => new SelectListItem
            {
                Text  = x.NameType,
                Value = x.Id.ToString()
            }).ToList();
            var model = new CreateReservationViewModel
            {
                ReservationTypes = resrvTypesItems
            };

            return(View(model));
        }
Beispiel #2
0
        // GET: ReservationTypeController
        public ActionResult Index()
        {
            var reservationTypes = _repo.GetAll();
            var model            = reservationTypes.Select(a => new ReservationTypeViewModel()
            {
                Id = a.Id, Name = a.Name, Number = a.Number
            }).ToList();

            return(View(model));
        }
Beispiel #3
0
        // GET: ReservationType
        public ActionResult Index()
        {
            var reservationTypes = _repo.GetAll();

            return(View(reservationTypes));
        }