public async Task <IActionResult> Edit(int id, [Bind("Id,Series,SeriesAgeGroupe,MatchLength,HDFee,LDFee,SeriesCategory")] MatchFee matchFee) { if (id != matchFee.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(matchFee); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MatchFeeExists(matchFee.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(matchFee)); }
public async Task <IActionResult> Create([Bind("Id,Series,SeriesAgeGroupe,MatchLength,HDFee,LDFee,SeriesCategory")] MatchFee matchFee) { if (ModelState.IsValid) { _context.Add(matchFee); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(matchFee)); }