コード例 #1
0
        public async Task <ActionResult <Customer> > UpdateCustomer([FromBody] Customer customer)
        {
            _context.Update(customer);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetCustomer", new { id = customer.Id }, customer));
        }
コード例 #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));
        }
コード例 #3
0
        public async Task <ActionResult <Supplier> > UpdateStudent([FromBody] Supplier supplier)
        {
            _context.Update(supplier);
            await _context.SaveChangesAsync();

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

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