예제 #1
0
        protected DeleteableProvider <T> CreateDeleteable <T>() where T : class, new()
        {
            var reval      = InstanceFactory.GetDeleteableProvider <T>(this.CurrentConnectionConfig);
            var sqlBuilder = InstanceFactory.GetSqlbuilder(this.CurrentConnectionConfig);;

            reval.Context                              = this.Context;
            reval.SqlBuilder                           = sqlBuilder;
            sqlBuilder.DeleteBuilder                   = reval.DeleteBuilder = InstanceFactory.GetDeleteBuilder(this.CurrentConnectionConfig);
            sqlBuilder.DeleteBuilder.Builder           = sqlBuilder;
            sqlBuilder.DeleteBuilder.LambdaExpressions = InstanceFactory.GetLambdaExpressions(this.CurrentConnectionConfig);
            sqlBuilder.Context                         = reval.SqlBuilder.DeleteBuilder.Context = this.Context;
            return(reval);
        }
예제 #2
0
        protected DeleteableProvider <T> CreateDeleteable <T>() where T : class, new()
        {
            this.SugarActionType = SugarActionType.Delete;
            var result     = InstanceFactory.GetDeleteableProvider <T>(this.CurrentConnectionConfig);
            var sqlBuilder = InstanceFactory.GetSqlbuilder(this.CurrentConnectionConfig);;

            result.Context                             = this;
            result.SqlBuilder                          = sqlBuilder;
            sqlBuilder.DeleteBuilder                   = result.DeleteBuilder = InstanceFactory.GetDeleteBuilder(this.CurrentConnectionConfig);
            sqlBuilder.DeleteBuilder.Builder           = sqlBuilder;
            sqlBuilder.DeleteBuilder.LambdaExpressions = InstanceFactory.GetLambdaExpressions(this.CurrentConnectionConfig);
            sqlBuilder.Context                         = result.SqlBuilder.DeleteBuilder.Context = this;
            return(result);
        }