public async Task <ActionResult <LigneFactureFrs> > PostLigneFactureFrs(LigneFactureFrs ligneFactureFrs) { _context.LigneFactureFrs.Add(ligneFactureFrs); await _context.SaveChangesAsync(); return(CreatedAtAction("GetLigneFactureFrs", new { id = ligneFactureFrs.IdLi }, ligneFactureFrs)); }
public async Task <IActionResult> PutLigneFactureFrs(Guid id, LigneFactureFrs ligneFactureFrs) { if (id != ligneFactureFrs.IdLi) { return(BadRequest()); } _context.Entry(ligneFactureFrs).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LigneFactureFrsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }