/// <summary>
        /// 返回 是否成功新增
        /// </summary>
        public override bool Insert <T>(InsertBuilder insertBuilder)
        {
            if (insertBuilder == null)
            {
                throw new NotImplementedException("缺少有效的" + nameof(InsertBuilder));
            }
            DbCommand command = Session.CreateCommand();

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