Пример #1
0
        /// <summary>
        /// 根据实体进行软删除
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool DeleteStatus(T t)
        {
            bool isSuccess = true;

            try
            {
                WriteDataBase.BeginTransaction();
                isSuccess = WriteDataBase.DeleteStatus(t) > 0;
                WriteDataBase.CompleteTransaction();
            }
            catch (Exception ex)
            {
                log.Info("Delete(T):" + ex);
                isSuccess = false;
                WriteDataBase.AbortTransaction();
                WriteDataBase.CloseSharedConnection();
            }
            finally
            {
                WriteDataBase.CloseSharedConnection();
            }
            return(isSuccess);
        }