public ActionResult Delete(int id) { var status = userInfoRepository.Delete(id); Session["Status"] = status ? "Success" : "Failed"; Session["Message"] = status ? "UserInfo Successfully Deleted" : "UserInfo Deletion Failed"; return(RedirectToAction("Index")); }
public Result DeleteUser(Guid id) { var user = _userInfoRepository.Get(id); _userInfoRepository.Delete(user); return(Result.AsSuccess()); }
public void DeleteWithUserInfoReturnsExpectedResult() { //Act var actual = userInfoRepository.Delete("Rathish123"); // Assert Assert.True(actual); }
public void DeleteUserInfo(long Id) { var entity = userInfoRepository.Get(Id); if (entity == null) { throw new Exception("未找到删除对象"); } userInfoRepository.Delete(entity); }
// DELETE api/<controller>/5 public void Delete(string id) { _userInfoRepository.Delete(Guid.Parse(id)); }
public void Delete(UserInfo entity) { userInfoRepo.Delete(entity); }
public bool Delete(UserInfo entity) { return(_userInfoRepository.Delete(entity)); }
/// <summary> /// 根据Id删除 /// </summary> /// <param name="id"></param> public void Delete(string id) { _repository.Delete(id); }