Esempio n. 1
0
        // GET: VacationProperty/Edit/5
        public async Task <IActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var vacationProperty = await _repository.FindVacationPropertyFirstOrDefaultAsync(id);

            if (vacationProperty == null)
            {
                return(NotFound());
            }
            ViewData["UserId"] = vacationProperty.UserId;
            return(View(vacationProperty));
        }
        // GET: Reservation/Create/1
        public async Task <IActionResult> Create(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            var property = await _repository.FindVacationPropertyFirstOrDefaultAsync(id);

            if (property == null)
            {
                return(NotFound());
            }

            ViewData["VacationProperty"] = property;
            return(View());
        }