Esempio n. 1
0
        /// <summary>
        /// 失败表示影响数据为0
        /// </summary>
        public override bool Delete <T>(DeleteBuilder deleteBuilder)
        {
            if (deleteBuilder == null)
            {
                throw new NotImplementedException("缺少有效的" + nameof(DeleteBuilder));
            }
            DbCommand command = Session.CreateCommand();

            command.CommandText = deleteBuilder.ToQueryString(Session, new T().TableName);
            deleteBuilder.AddParameter(command, Session);
            WriteQueryLog(command, Session);
            return(Session.ExecuteNonQuery(command) > 0);
        }
Esempio n. 2
0
 /// <summary>
 /// 返回 是否有数据受操作影响
 /// </summary>
 public abstract bool Delete <T>(DeleteBuilder deleteBuilder) where T : VLModel_DB, new();