IDbContextOptionsBuilderInfrastructure.AddOrUpdateExtension<TExtension> Method

Definition

Adds the given extension to the options. If an existing extension of the same type already exists, it will be replaced.

This property is intended for use by extension methods to configure the context. It is not intended to be used in application code.

public void AddOrUpdateExtension<TExtension> (TExtension extension) where TExtension : class, Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension;
abstract member AddOrUpdateExtension : 'Extension -> unit (requires 'Extension : null and 'Extension :> Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension)
Public Sub AddOrUpdateExtension(Of TExtension As {Class, IDbContextOptionsExtension}) (extension As TExtension)

Type Parameters

TExtension

The type of extension to be added.

Parameters

extension
TExtension

The extension to be added.

Remarks

See Implementation of database providers and extensions for more information and examples.

Applies to