public virtual OperationResult Delete(Comment comment) { try { using var transactionScope = new TransactionScope(TransactionScopeOption.Required, transactionOptions, TransactionScopeAsyncFlowOption.Enabled); _dao.Delete(comment); transactionScope.Complete(); return(new OperationResult() { Success = true }); } catch (Exception e) { return(new OperationResult() { Success = false, Exception = e }); } }
/// <summary> /// 删除评论 /// </summary> /// <param name="id"></param> /// <returns></returns> public bool Delete(string id) { return(cdao.Delete(id)); }
public void Delete(int ID) { commentDAO.Delete(ID); }
/// <summary> /// 删除一条记录 /// </summary> /// <param name="objectId">主键</param> /// <returns>是否成功</returns> public bool Delete(string objectId) { return(_dao.Delete(objectId)); }