Exemplo n.º 1
0
        public async Task <ActionResult> ActiveStatus(UserAccount userAccount)
        {
            UserAccount userAccount1 = new UserAccount();

            userAccount1.EMP_ID   = userAccount.EMP_ID;
            userAccount1.ACTIVATE = userAccount.ACTIVATE;

            if (userAccount.EMP_ID != userAccount1.EMP_ID)
            {
                return(BadRequest());
            }
            try
            {
                await _userAccount.ActiveStatus(userAccount1);
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!_userAccount.UserAccountExists(userAccount1.EMP_ID))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }
            return(NoContent());
        }