public async Task <IActionResult> PuthallOfFame(int id, hallOfFame hallOfFame) { if (id != hallOfFame.id) { return(BadRequest()); } _context.Entry(hallOfFame).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!hallOfFameExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <hallOfFame> > PosthallOfFame(hallOfFame hallOfFame) { _context.hallOfFames.Add(hallOfFame); await _context.SaveChangesAsync(); return(CreatedAtAction("GethallOfFame", new { id = hallOfFame.id }, hallOfFame)); }