Share via


DbContextOptionsBuilder.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.

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

Type Parameters

TExtension

The type of extension to be added.

Parameters

extension
TExtension

The extension to be added.

Implements

Remarks

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

Applies to