public async Task <IActionResult> Edit(int id, [Bind("Id,Name,AccessNumber")] TypeReservations typeReservations)
        {
            if (id != typeReservations.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(typeReservations);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TypeReservationsExists(typeReservations.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(typeReservations));
        }
        public async Task <IActionResult> Create([Bind("Id,Name,AccessNumber")] TypeReservations typeReservations)
        {
            if (ModelState.IsValid)
            {
                _context.Add(typeReservations);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(typeReservations));
        }