Table of Contents

Class CloudStorageOrmOptionsExtension

Namespace
CloudStorageORM.Infrastructure
Assembly
CloudStorageORM.dll

EF Core options extension that wires CloudStorageORM services and settings.

public class CloudStorageOrmOptionsExtension : IDbContextOptionsExtension
Inheritance
CloudStorageOrmOptionsExtension
Implements
Inherited Members

Constructors

CloudStorageOrmOptionsExtension(CloudStorageOptions)

Creates a new CloudStorageORM options extension.

public CloudStorageOrmOptionsExtension(CloudStorageOptions options)

Parameters

options CloudStorageOptions

Cloud storage options used to configure provider services.

Examples

var extension = new CloudStorageOrmOptionsExtension(options);

Properties

Info

Information/metadata about the extension.

public DbContextOptionsExtensionInfo Info { get; }

Property Value

DbContextOptionsExtensionInfo

Options

public CloudStorageOptions Options { get; }

Property Value

CloudStorageOptions

Methods

ApplyServices(IServiceCollection)

Adds the services required to make the selected options work. This is used when there is no external IServiceProvider and EF is maintaining its own service provider internally. This allows database providers (and other extensions) to register their required services when EF is creating an service provider.

public void ApplyServices(IServiceCollection services)

Parameters

services IServiceCollection

The collection to add services to.

Validate(IDbContextOptions)

Gives the extension a chance to validate that all options in the extension are valid. Most extensions do not have invalid combinations and so this will be a no-op. If options are invalid, then an exception should be thrown.

public void Validate(IDbContextOptions options)

Parameters

options IDbContextOptions

The options being validated.