public IActionResult Update(int IdDodatek, Dodatki updatedAdditive) { if (_context.Dodatki.Count(e => e.IdDodatek == IdDodatek) == 0) { return(NotFound()); } _context.Dodatki.Attach(updatedAdditive); _context.Entry(updatedAdditive).State = EntityState.Modified; _context.SaveChanges(); return(Ok(updatedAdditive)); }
public IActionResult Update(int IdUser, Klient updatedClient) { if (_context.Klient.Count(e => e.IdUser == IdUser) == 0) { return(NotFound()); } _context.Klient.Attach(updatedClient); _context.Entry(updatedClient).State = EntityState.Modified; _context.SaveChanges(); return(Ok(updatedClient)); }
public IActionResult Update(int IdZamowienie, Zamowienie updatedOrder) { if (_context.Zamowienie.Count(e => e.IdZamowienie == IdZamowienie) == 0) { return(NotFound()); } _context.Zamowienie.Attach(updatedOrder); _context.Entry(updatedOrder).State = EntityState.Modified; _context.SaveChanges(); return(Ok(updatedOrder)); }