public async Task <ActionResult <Customer> > UpdateCustomer([FromBody] Customer customer)
        {
            _context.Update(customer);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetCustomer", new { id = customer.Id }, customer));
        }
Exemplo n.º 2
0
        public async Task <ActionResult <Car> > UpdateCar([FromBody] Car car)
        {
            _context.Update(car);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetCar", new { id = car.Id }, car));
        }
        public async Task <ActionResult <Supplier> > UpdateStudent([FromBody] Supplier supplier)
        {
            _context.Update(supplier);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetSupplier", new { id = supplier.Id }, supplier));
        }
        public async Task <ActionResult <Store> > UpdateStudent([FromBody] Store store)
        {
            _context.Update(store);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetStore", new { id = store.Id }, store));
        }