public async Task <ActionResult <JuryInPanel> > PostJuryInPanel(JuryInPanel juryInPanel) { _context.JuryInPanels.Add(juryInPanel); await _context.SaveChangesAsync(); return(CreatedAtAction("GetJuryInPanel", new { id = juryInPanel.JuryInPanelId }, juryInPanel)); }
public async Task <IActionResult> PutJuryInPanel(int id, JuryInPanel juryInPanel) { if (id != juryInPanel.JuryInPanelId) { return(BadRequest()); } _context.Entry(juryInPanel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JuryInPanelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }