/// <summary> /// According user id then remove data /// </summary> /// <param name="id"></param> /// <returns></returns> public IResult Delete(string id) { var result = new Result(); try { if (string.IsNullOrEmpty(id.Trim())) { return(result.Fail("The id can't be empty")); } bool data = _userAccess.DeleteUserByID(id); if (data) { result.Success("Delete success"); } else { result.Fail("Delete fail"); } } catch (Exception ex) { result.Fail(ex.Message); } return(result); }