Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        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));
        }