public async Task <IActionResult> Edit(int id, [Bind("Id,MatchReportingName")] MatchReporting matchReporting) { if (id != matchReporting.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(matchReporting); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MatchReportingExists(matchReporting.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(matchReporting)); }
public async Task <IActionResult> Create([Bind("Id,MatchReportingName")] MatchReporting matchReporting) { if (ModelState.IsValid) { _context.Add(matchReporting); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(matchReporting)); }