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