public async Task <IActionResult> PutConfirmationReception(int id, ConfirmationReception confirmationReception) { if (id != confirmationReception.Id) { return(BadRequest()); } _context.Entry(confirmationReception).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ConfirmationReceptionExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <ConfirmationReception> > PostConfirmationReception(ConfirmationReception confirmationReception) { _context.ConfirmationReceptions.Add(confirmationReception); await _context.SaveChangesAsync(); return(CreatedAtAction("GetConfirmationReception", new { id = confirmationReception.Id }, confirmationReception)); }