Пример #1
0
 public MySqlDbContext(IFrommGnerate formGnerate, ISelectGnerate selectGnerate, IWhereParameterGenerate whereGnerate, IEditGenerate editGenerate
                       , DbConnection conn, ILogger <MySqlDbContext> logger)
 {
     this.formGnerate   = formGnerate;
     this.selectGnerate = selectGnerate;
     this.whereGnerate  = whereGnerate;
     this.editGenerate  = editGenerate;
     this.conn          = conn;
     this.logger        = logger;
 }
Пример #2
0
        private StringBuilder QueryString <TSource, TResult>(
            ISelectGnerate selectGnerate, IFrommGnerate formGnerate, IWhereParameterGenerate whereGnerate,
            Expression <Func <TSource, TResult> > selectExpression, Expression formExpression, Expression <Func <TSource, bool> > whereExpression,
            IDictionary <string, object> dic)
        {
            StringBuilder build = new StringBuilder();

            build.AppendLine(selectGnerate.Explain(selectExpression));
            build.AppendLine(formGnerate.Explain(formExpression));
            build.AppendLine(whereGnerate.Explain(whereExpression, dic));

            return(build);
        }