public async Task <IActionResult> PutConfCsIndication([FromRoute] int id, [FromBody] ConfCsIndication confCsIndication) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != confCsIndication.Recid) { return(BadRequest()); } _context.Entry(confCsIndication).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ConfCsIndicationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PostConfCsIndication([FromBody] ConfCsIndication confCsIndication) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.ConfCsIndication.Add(confCsIndication); await _context.SaveChangesAsync(); return(CreatedAtAction("GetConfCsIndication", new { id = confCsIndication.Recid }, confCsIndication)); }