public async Task <IActionResult> AddMenu(int?id, EventFoodViewModel @event)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            if (id != @event.Id)
            {
                return(NotFound());
            }

            Event e = await _context.Events.FindAsync(id);

            if (e == null)
            {
                return(NotFound());
            }
            if (e.AssignedMenu != 0)
            {
                return(RedirectToAction(nameof(Food), new { id }));
            }

            e.AssignedMenu = @event.SelectedMenu;
            _context.Events.Update(e);
            await _context.SaveChangesAsync();

            return(RedirectToAction(nameof(Food), new { id }));
        }
        /// <summary>
        /// HTTP GET endpoint of "Events/Food/<paramref name="id"/>". <para/>
        /// Shows catering information for the current event; including the current
        /// menu and the food that is on it.
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task <IActionResult> Food(int?id)
        {
            Event e = await _context.Events.FirstOrDefaultAsync(x => x.Id == id);

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


            List <MenuGetDto> allmenus = await _menuManagement.GetMenus();

            List <int> events = await _context.Events.Where(x => x.AssignedMenu != 0).Select(x => x.AssignedMenu).ToListAsync();

            List <MenuGetDto> available = allmenus.Where(x => !events.Contains(x.Id)).ToList();

            EventFoodViewModel vm = new EventFoodViewModel()
            {
                Id             = e.Id,
                Date           = e.Date,
                Title          = e.Title,
                EventType      = (await _eventTypes.GetEventType(e.TypeId)).Title,
                Menu           = await _menuManagement.GetMenu(e.AssignedMenu),
                AvailableMenus = available
            };

            return(View(vm));
        }