public async Task <IActionResult> PutPayemeentReception(int id, PayemeentReception payemeentReception) { if (id != payemeentReception.Id) { return(BadRequest()); } _context.Entry(payemeentReception).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PayemeentReceptionExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <PayemeentReception> > PostPayemeentReception(PayemeentReception payemeentReception) { _context.payemeentReceptions.Add(payemeentReception); await _context.SaveChangesAsync(); return(CreatedAtAction("GetPayemeentReception", new { id = payemeentReception.Id }, payemeentReception)); }