public async Task <IActionResult> PutListeClientCommercial(int id, ListeClientCommercial listeClientCommercial) { if (id != listeClientCommercial.Id) { return(BadRequest()); } _context.Entry(listeClientCommercial).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ListeClientCommercialExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <ListeClientCommercial> > PostListeClientCommercial(ListeClientCommercial listeClientCommercial) { _context.ListeClientCommercials.Add(listeClientCommercial); await _context.SaveChangesAsync(); return(CreatedAtAction("GetListeClientCommercial", new { id = listeClientCommercial.Id }, listeClientCommercial)); }