public IActionResult Update(Zamowienie upddost) { if (_context.Zamowienie.Count(e => e.IdZam == upddost.IdZam) == 0) { return(NotFound()); } _context.Zamowienie.Attach(upddost); _context.Entry(upddost).State = Microsoft.EntityFrameworkCore.EntityState.Modified; _context.SaveChanges(); return(Ok(upddost)); }
public IActionResult Update(Dostawca upddost) { if (_context.Dostawca.Count(e => e.IdPrac == upddost.IdPrac) == 0) { return(NotFound()); } _context.Dostawca.Attach(upddost); _context.Entry(upddost).State = Microsoft.EntityFrameworkCore.EntityState.Modified; _context.SaveChanges(); return(Ok(upddost)); }