Пример #1
0
 public LeettleDbImpl(string connectionString, Type dbConnectionType, BindStrategy bindStrategy, IPreparedSqlProvider sqlProvider)
 {
     this.connectionString = connectionString;
     this.dbConnectionType = dbConnectionType;
     this.bindStrategy     = bindStrategy;
     this.sqlProvider      = sqlProvider;
 }
Пример #2
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public LeettleDb Build()
 {
     Assert.NotNull(connectionString, "connectionString must not be null; use WithConnectionString");
     Assert.NotNull(dbConnectionType, "connectionString must not be null; use WithConnectionType");
     if (bindStrategy == null)
     {
         bindStrategy = new CleanBindStrategy(':');
     }
     if (sqlProvider == null)
     {
         sqlProvider = new EmptySqlProvider();
     }
     return(new LeettleDbImpl(connectionString, dbConnectionType, bindStrategy, sqlProvider));
 }
Пример #3
0
 public Connection(DbConnection dbCon, BindStrategy bindStrategy, IPreparedSqlProvider sqlProvider)
 {
     this.dbCon        = dbCon;
     this.bindStrategy = bindStrategy;
     this.sqlProvider  = sqlProvider;
 }
Пример #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sqlProvider"></param>
 /// <returns></returns>
 public LeettleDbBuilder WithPrepqredSqlProvider(IPreparedSqlProvider sqlProvider)
 {
     Assert.NotNull(sqlProvider, "queryProvider must not be null");
     this.sqlProvider = sqlProvider;
     return(this);
 }