Table of Contents

AddEfCoreDataStore Method

Definition

AddEfCoreDataStore<T>(IServiceCollection, Action<ServiceOptions>)

Adds an implementation of EfCoreDataStore<T> to the specified IServiceCollection.

public static IServiceCollection AddEfCoreDataStore<T>(this IServiceCollection services, Action<ServiceOptions> setup = null) where T : class

Parameters

services IServiceCollection

The IServiceCollection to add the service to.

setup Action<ServiceOptions>

The ServiceOptions which may be configured.

Returns

IServiceCollection

A reference to services so that additional calls can be chained.

Type Parameters

T

The type of the DTO.

Exceptions

ArgumentNullException

services cannot be null.

AddEfCoreDataStore<T, TMarker>(IServiceCollection, Action<ServiceOptions>)

Adds an implementation of EfCoreDataStore<T> to the specified IServiceCollection.

public static IServiceCollection AddEfCoreDataStore<T, TMarker>(this IServiceCollection services, Action<ServiceOptions> setup = null) where T : class

Parameters

services IServiceCollection

The IServiceCollection to add the service to.

setup Action<ServiceOptions>

The ServiceOptions which may be configured.

Returns

IServiceCollection

A reference to services so that additional calls can be chained.

Type Parameters

T

The type of the DTO.

TMarker

The type used to mark the implementation that this data access object represents. Optimized for Microsoft Dependency Injection.

Exceptions

ArgumentNullException

services cannot be null.