public LeettleDbImpl(string connectionString, Type dbConnectionType, BindStrategy bindStrategy, IPreparedSqlProvider sqlProvider) { this.connectionString = connectionString; this.dbConnectionType = dbConnectionType; this.bindStrategy = bindStrategy; this.sqlProvider = sqlProvider; }
/// <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)); }
public Connection(DbConnection dbCon, BindStrategy bindStrategy, IPreparedSqlProvider sqlProvider) { this.dbCon = dbCon; this.bindStrategy = bindStrategy; this.sqlProvider = sqlProvider; }
/// <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); }