Table of Contents

Class DataConfigurationBuilder

Namespace
FluentCommand
Assembly
FluentCommand.dll

A configuration builder class

public class DataConfigurationBuilder
Inheritance
DataConfigurationBuilder
Inherited Members

Constructors

DataConfigurationBuilder(IServiceCollection)

Initializes a new instance of the DataConfigurationBuilder class.

public DataConfigurationBuilder(IServiceCollection services)

Parameters

services IServiceCollection

The services.

Methods

AddDataCache<TService>()

Adds the data cache service to use with this configuration.

public DataConfigurationBuilder AddDataCache<TService>() where TService : class, IDataCache

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

Type Parameters

TService

The type of the service.

See Also

AddDataCache<TService>(Func<IServiceProvider, TService>)

Adds the data cache service to use with this configuration.

public DataConfigurationBuilder AddDataCache<TService>(Func<IServiceProvider, TService> implementationFactory) where TService : class, IDataCache

Parameters

implementationFactory Func<IServiceProvider, TService>

The implementation factory.

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

Type Parameters

TService

The type of the service.

See Also

AddDataCache<TService>(TService)

Adds the data cache service to use with this configuration.

public DataConfigurationBuilder AddDataCache<TService>(TService dataCache) where TService : class, IDataCache

Parameters

dataCache TService

The data cache.

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

Type Parameters

TService

The type of the service.

See Also

AddPostgreSqlGenerator()

Adds the PostgreSQL generator to use with this configuration.

public DataConfigurationBuilder AddPostgreSqlGenerator()

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

AddProviderFactory<TService>()

Adds the provider factory to use with this configuration.

public DataConfigurationBuilder AddProviderFactory<TService>() where TService : DbProviderFactory

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

Type Parameters

TService

The type of the service.

See Also

AddProviderFactory<TService>(Func<IServiceProvider, TService>)

Adds the provider factory to use with this configuration.

public DataConfigurationBuilder AddProviderFactory<TService>(Func<IServiceProvider, TService> implementationFactory) where TService : DbProviderFactory

Parameters

implementationFactory Func<IServiceProvider, TService>

The implementation factory.

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

Type Parameters

TService

The type of the service.

See Also

AddProviderFactory<TService>(TService)

Adds the provider factory to use with this configuration.

public DataConfigurationBuilder AddProviderFactory<TService>(TService providerFactory) where TService : DbProviderFactory

Parameters

providerFactory TService

The provider factory.

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

Type Parameters

TService

The type of the service.

See Also

AddQueryGenerator<TService>()

Adds the query generator service to use with this configuration.

public DataConfigurationBuilder AddQueryGenerator<TService>() where TService : class, IQueryGenerator

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

Type Parameters

TService

The type of the service.

See Also

AddQueryGenerator<TService>(Func<IServiceProvider, TService>)

Adds the query generator service to use with this configuration.

public DataConfigurationBuilder AddQueryGenerator<TService>(Func<IServiceProvider, TService> implementationFactory) where TService : class, IQueryGenerator

Parameters

implementationFactory Func<IServiceProvider, TService>

The implementation factory.

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

Type Parameters

TService

The type of the service.

See Also

AddQueryGenerator<TService>(TService)

Adds the query generator service to use with this configuration.

public DataConfigurationBuilder AddQueryGenerator<TService>(TService queryGenerator) where TService : class, IQueryGenerator

Parameters

queryGenerator TService

The query generator.

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

Type Parameters

TService

The type of the service.

See Also

AddQueryLogger<TService>()

Adds the query logger service to use with this configuration.

public DataConfigurationBuilder AddQueryLogger<TService>() where TService : class, IDataQueryLogger

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

Type Parameters

TService

The type of the service.

See Also

AddQueryLogger<TService>(Func<IServiceProvider, TService>)

Adds the query logger service to use with this configuration.

public DataConfigurationBuilder AddQueryLogger<TService>(Func<IServiceProvider, TService> implementationFactory) where TService : class, IDataQueryLogger

Parameters

implementationFactory Func<IServiceProvider, TService>

The implementation factory.

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

Type Parameters

TService

The type of the service.

See Also

AddQueryLogger<TService>(TService)

Adds the query logger service to use with this configuration.

public DataConfigurationBuilder AddQueryLogger<TService>(TService queryLogger) where TService : class, IDataQueryLogger

Parameters

queryLogger TService

The query logger.

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

Type Parameters

TService

The type of the service.

See Also

AddService(Action<IServiceCollection>)

Adds services via the configuration setup action.

public DataConfigurationBuilder AddService(Action<IServiceCollection> setupAction)

Parameters

setupAction Action<IServiceCollection>

The configuration setup action.

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

AddSqlServerGenerator()

Adds the SQL server generator to use with this configuration.

public DataConfigurationBuilder AddSqlServerGenerator()

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

AddSqliteGenerator()

Adds the sqlite generator to use with this configuration.

public DataConfigurationBuilder AddSqliteGenerator()

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

UseConnectionName(string)

Set the connection string or the name of connection string located in the application configuration

public DataConfigurationBuilder UseConnectionName(string nameOrConnectionString)

Parameters

nameOrConnectionString string

The connection string or the name of connection string located in the application configuration.

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.

UseConnectionString(string)

The connection string to use with fluent command.

public DataConfigurationBuilder UseConnectionString(string connectionString)

Parameters

connectionString string

The connection string.

Returns

DataConfigurationBuilder

The same configuration builder so that multiple calls can be chained.