Exemplo n.º 1
0
 public LeettleDbImpl(string connectionString, Type dbConnectionType, BindStrategy bindStrategy, IPreparedSqlProvider sqlProvider)
 {
     this.connectionString = connectionString;
     this.dbConnectionType = dbConnectionType;
     this.bindStrategy     = bindStrategy;
     this.sqlProvider      = sqlProvider;
 }
 public HybridModelBinder(
     BindStrategy bindStrategy,
     IEnumerable <string> fallbackBindingOrder = null)
 {
     this.bindStrategy         = bindStrategy;
     this.fallbackBindingOrder = fallbackBindingOrder ?? FallbackBindingOrder;
 }
Exemplo n.º 3
0
        private void RunTest(BindStrategy bindStrategy, TestTask testTask)
        {
            var leettleDb = new LeettleDbBuilder()
                            .WithConnectionString(ConnectionString)
                            .WithConnectionType(DbConnectionType)
                            .WithBindStrategy(bindStrategy)
                            .Build();

            using (var con = leettleDb.OpenConnection())
            {
                try
                {
                    con.NewCommand(ToProperSql(SqlCreateTable)).Execute();

                    testTask(con);
                }
                finally
                {
                    con.NewCommand(ToProperSql(SqlDropTable)).Execute();
                }
            }
        }
Exemplo n.º 4
0
 public Connection(DbConnection dbCon, BindStrategy bindStrategy, IPreparedSqlProvider sqlProvider)
 {
     this.dbCon        = dbCon;
     this.bindStrategy = bindStrategy;
     this.sqlProvider  = sqlProvider;
 }
 public HybridModelBinder(BindStrategy bindStrategy)
 {
     this.bindStrategy = bindStrategy;
 }
Exemplo n.º 6
0
 public DbCommandWrapper(Connection connection, BindStrategy bindStrategy, string sql)
 {
     this.connection   = connection;
     this.BindStrategy = bindStrategy;
     this.sql          = sql;
 }
Exemplo n.º 7
0
 public DbDataReaderWrapper(DbDataReader dataReader, BindStrategy bindStrategy)
 {
     this.DataReader   = dataReader;
     this.bindStrategy = bindStrategy;
 }