Skip to content

AdoNetGrainStorageServiceCollectionExtensions Methods

Provides extension methods for registering ADO.NET grain storage with a service collection.

AddAdoNetGrainStorage(IServiceCollection, Action<AdoNetGrainStorageOptions>)

staticextension
View source
public static IServiceCollection AddAdoNetGrainStorage(this IServiceCollection services, Action<AdoNetGrainStorageOptions> configureOptions)
Adds ADO.NET grain storage as the default grain storage provider.

Parameters

servicesIServiceCollection
The service collection.
configureOptionsAction<AdoNetGrainStorageOptions>
The delegate used to configure the storage provider.

Returns

The provided Microsoft.Extensions.DependencyInjection.IServiceCollection, for chaining.

AddAdoNetGrainStorage(IServiceCollection, string, Action<AdoNetGrainStorageOptions>)

staticextension
View source
public static IServiceCollection AddAdoNetGrainStorage(this IServiceCollection services, string name, Action<AdoNetGrainStorageOptions> configureOptions)
Adds a named ADO.NET grain storage provider.

Parameters

servicesIServiceCollection
The service collection.
namestring
The storage provider name.
configureOptionsAction<AdoNetGrainStorageOptions>
The delegate used to configure the storage provider.

Returns

The provided Microsoft.Extensions.DependencyInjection.IServiceCollection, for chaining.

AddAdoNetGrainStorage(IServiceCollection, string, Action<OptionsBuilder<AdoNetGrainStorageOptions>>)

staticextension
View source
public static IServiceCollection AddAdoNetGrainStorage(this IServiceCollection services, string name, Action<OptionsBuilder<AdoNetGrainStorageOptions>>? configureOptions = null)
Adds a named ADO.NET grain storage provider.

Parameters

servicesIServiceCollection
The service collection.
namestring
The storage provider name.
configureOptionsAction<OptionsBuilder<AdoNetGrainStorageOptions>>
The delegate used to configure the named options builder.

Returns

The provided Microsoft.Extensions.DependencyInjection.IServiceCollection, for chaining.

AddAdoNetGrainStorageAsDefault(IServiceCollection, Action<OptionsBuilder<AdoNetGrainStorageOptions>>)

staticextension
View source
public static IServiceCollection AddAdoNetGrainStorageAsDefault(this IServiceCollection services, Action<OptionsBuilder<AdoNetGrainStorageOptions>>? configureOptions = null)
Adds ADO.NET grain storage as the default grain storage provider.

Parameters

servicesIServiceCollection
The service collection.
configureOptionsAction<OptionsBuilder<AdoNetGrainStorageOptions>>
The delegate used to configure the named options builder.

Returns

The provided Microsoft.Extensions.DependencyInjection.IServiceCollection, for chaining.