public async Task <IActionResult> PostConfChildPresentation([FromBody] ConfChildPresentation confChildPresentation) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.ConfChildPresentation.Add(confChildPresentation); await _context.SaveChangesAsync(); return(CreatedAtAction("GetConfChildPresentation", new { id = confChildPresentation.Recid }, confChildPresentation)); }
public async Task <IActionResult> PutConfChildPresentation([FromRoute] int id, [FromBody] ConfChildPresentation confChildPresentation) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != confChildPresentation.Recid) { return(BadRequest()); } _context.Entry(confChildPresentation).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ConfChildPresentationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }