Exemplo n.º 1
0
        public virtual IInsertable <T> Insertable <T>(T[] insertObjs) where T : class, new()
        {
            InitMppingInfo <T>();
            InsertableProvider <T> reval = base.CreateInsertable(insertObjs);

            return(reval);
        }
Exemplo n.º 2
0
        protected InsertableProvider <T> CreateInsertable <T>(T[] insertObjs) where T : class, new()
        {
            var reval      = new InsertableProvider <T>();
            var sqlBuilder = InstanceFactory.GetSqlbuilder(this.CurrentConnectionConfig);;

            reval.Context                              = this.Context;
            reval.EntityInfo                           = this.Context.EntityProvider.GetEntityInfo <T>();
            reval.SqlBuilder                           = sqlBuilder;
            reval.InsertObjs                           = insertObjs;
            sqlBuilder.InsertBuilder                   = reval.InsertBuilder = InstanceFactory.GetInsertBuilder(this.CurrentConnectionConfig);
            sqlBuilder.InsertBuilder.Builder           = sqlBuilder;
            sqlBuilder.InsertBuilder.LambdaExpressions = InstanceFactory.GetLambdaExpressions(this.CurrentConnectionConfig);
            sqlBuilder.Context                         = reval.SqlBuilder.InsertBuilder.Context = this.Context;
            reval.Init();
            return(reval);
        }