public IHttpActionResult DeleteUser(string ID) { try { bool isDeleted = BLUsers.DeleteUser(ID); if (isDeleted) { return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.OK, "user Deleted successfully"))); } return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "Failed to delete user"))); } catch { return(InternalServerError()); } }
/// <summary> /// This method is used for Delete Uers /// </summary> /// <param name="UserId"></param> /// <returns></returns> public string DeleteUers(string UserId) { objBLUsers = new BLUsers(); objDataOperationResponse = objBLUsers.DeleteUser(Convert.ToInt32(UserId)); return(objDataOperationResponse.Message); }