Esempio n. 1
0
        public SqlQueryable <T> Insert(Expression <Func <T> > expression)
        {
            if (expression == null)
            {
                throw new ArgumentNullException("expression", "Value cannot be null");
            }

            this.Clear();
            this._sqlBuilder.SetSqlCommandType(SqlCommandType.Insert);
            this._sqlBuilder.IsSingleTable = true;
            this._sqlBuilder.SqlInsertStr  = $"insert into {this._mainTableName}";
            SqlProvider.Insert(expression.Body, this._sqlBuilder);
            return(this);
        }