Exemplo n.º 1
0
 public IActionResult DeleteGroup(int id)
 {
     try
     {
         bool status = UserModal.DeleteUser(id);
         if (status)
         {
             return(Ok());
         }
         else
         {
             return(NotFound());
         }
     }
     catch (Exception ex) { return(BadRequest(ex)); }
 }
Exemplo n.º 2
0
        public IHttpActionResult Delete(string id)
        {
            if (string.IsNullOrEmpty(id) || !userModel.UserExist(id))
            {
                return(NotFound());
            }

            if (userModel.DeleteUser(id))
            {
                return(Ok());
            }
            else
            {
                return(InternalServerError());
            }
        }