コード例 #1
0
        public async Task <IActionResult> PutBusiness(int id, Business business)
        {
            if (id != business.Id)
            {
                return(BadRequest());
            }

            _context.Entry(business).State = EntityState.Modified;
            await _context.SaveChangesAsync();

            return(NoContent());
        }
コード例 #2
0
        public async Task <IActionResult> PutUser(int id, User user)
        {
            if (id != user.Id)
            {
                return(BadRequest());
            }

            _context.Entry(user).State = EntityState.Modified;
            await _context.SaveChangesAsync();

            return(NoContent());
        }