public async Task <IActionResult> PutFamille(long id, Famille famille) { if (id != famille.Id) { return(BadRequest()); } _context.Entry(famille).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FamilleExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutCommandeProduit(long id, CommandeProduit commandeProduit) { if (id != commandeProduit.Id) { return(BadRequest()); } _context.Entry(commandeProduit).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CommandeProduitExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutProduitFournisseur(long id, ProduitFournisseur produitFournisseur) { if (id != produitFournisseur.Id) { return(BadRequest()); } _context.Entry(produitFournisseur).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProduitFournisseurExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutStock(long id, Stock stock) { if (id != stock.Id) { return(BadRequest()); } _context.Entry(stock).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!StockExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }