public IDatabaseCommander Create(string connectionName = null) { connectionName ??= "DefaultConnection"; var builder = new OracleConnectionStringBuilder(_connectionStringCollection.Get(connectionName)); return(new OracleDatabaseCommander(builder, _databaseCommandBuilder)); }
/// <summary> /// Creates a new IDatabaseCommander instance /// </summary> /// <param name="connectionStringName">The name of the connection string in the IConnectionStringCollection</param> /// <returns>A new IDatabaseEntityCommander instance</returns> public IDatabaseEntityCommander Create(string connectionStringName = null) { var builder = new SqlConnectionStringBuilder(_connectionStringCollection.Get(connectionStringName)); return(new EntityFrameworkSqlServerDatabaseCommander(_dbContext, _databaseCommandBuilder, builder, _commandExecutor)); }
/// <summary> /// Creates a new IDatabaseCommander instance /// </summary> /// <param name="connectionStringName">The name of the connection string in the IConnectionStringCollection</param> /// <returns>A new IDatabaseEntityCommander instance</returns> public IDatabaseCommander Create(string connectionStringName = "DefaultConnection") { var builder = new SqlConnectionStringBuilder(_connectionStringCollection.Get(connectionStringName)); return(new SqlServerDatabaseCommander(builder, _databaseCommandBuilder, _sqlServerCommandExecutor)); }