public IActionResult Edit(int?id) { if (id == null) { return(NotFound()); } var table = _tableManager.GetTable(id.Value); if (table == null) { return(NotFound()); } var vm = new TableEditViewModel { ID = table.ID, BusinessID = table.BusinessID, Seats = table.Seats, Available = table.Available }; return(View(vm)); }