public async Task <IActionResult> PutWinterSeason(int id, WinterSeason winterSeason) { if (id != winterSeason.id) { return(BadRequest()); } _context.Entry(winterSeason).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!WinterSeasonExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutSkier(int id, Skier skier) { if (id != skier.fis_code) { return(BadRequest()); } _context.Entry(skier).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SkierExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutResult(int id, Result result) { if (id != result.result_id) { return(BadRequest()); } _context.Entry(result).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ResultExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> Create([Bind("fis_code,yaer,nation,athlete")] Skier skier) { if (ModelState.IsValid) { _context.Add(skier); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(skier)); }