DbContextOptions.GetExtension<TExtension> 方法

定义

获取指定类型的扩展。 如果未配置指定类型的扩展,则引发 。

public virtual TExtension GetExtension<TExtension> () where TExtension : class, Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension;
abstract member GetExtension : unit -> 'Extension (requires 'Extension : null and 'Extension :> Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension)
override this.GetExtension : unit -> 'Extension (requires 'Extension : null and 'Extension :> Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension)
Public Overridable Function GetExtension(Of TExtension As {Class, IDbContextOptionsExtension}) () As TExtension

类型参数

TExtension

要获取的扩展的类型。

返回

TExtension

扩展。

适用于