Example #1
0
        /// <summary>
        /// 失败表示存在更新影响条数为0的update
        /// </summary>
        public override bool Update <T>(UpdateBuilder updateBuilder)
        {
            if (updateBuilder == null)
            {
                throw new NotImplementedException("缺少有效的" + nameof(UpdateBuilder));
            }
            DbCommand command = Session.CreateCommand();

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