public async Task <ActionResult <JuryPanel> > PostJuryPanel(JuryPanel juryPanel) { _context.JuryPanels.Add(juryPanel); await _context.SaveChangesAsync(); return(CreatedAtAction("GetJuryPanel", new { id = juryPanel.PanelId }, juryPanel)); }
public async Task <IActionResult> PutJuryPanel(int id, JuryPanel juryPanel) { if (id != juryPanel.PanelId) { return(BadRequest()); } _context.Entry(juryPanel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JuryPanelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }