Exemplo n.º 1
0
        public IHttpActionResult DeleteUser(string userName)
        {
            var response = usersServices.DeleteUser(userName);

            if (response.ResultType)
            {
                return(Ok(response));
            }
            return(Content(HttpStatusCode.BadRequest, response));
        }
Exemplo n.º 2
0
        public IActionResult Delete(int id)
        {
            var todo = _userServices.FindUsersId(id);

            if (todo == null)
            {
                return(NotFound());
            }

            _userServices.DeleteUser(id);
            return(new NoContentResult());
        }
Exemplo n.º 3
0
        public async Task <IActionResult> OnPostAsync(int userid)
        {
            try
            {
                await _usersServices.DeleteUser(userid);

                return(RedirectToPage("../Index"));
            }
            catch (Exception)
            {
                return(RedirectToPage("../Error"));
            }
        }
 public async Task <bool> DeleteUser(long userId)
 {
     return(await _usersServices.DeleteUser(userId));
 }
 public void Delete(int id)
 {
     _usersServices.DeleteUser(id);
 }
Exemplo n.º 6
0
        public IActionResult DeleteUser(int userId)
        {
            User user = _userServices.DeleteUser(userId);

            return(Ok(user));
        }