语言

IConventionAnnotatableBuilder.RemoveAnnotation(String, Boolean) 方法

定义

注意

Use HasNoAnnotation

从此对象中删除具有给定名称的批注。

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder RemoveAnnotation(string name, bool fromDataAnnotation = false);
[System.Obsolete("Use HasNoAnnotation")]
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder RemoveAnnotation(string name, bool fromDataAnnotation = false);
[System.Obsolete("Use HasNoAnnotation")]
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder? RemoveAnnotation(string name, bool fromDataAnnotation = false);
abstract member RemoveAnnotation : string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
[<System.Obsolete("Use HasNoAnnotation")>]
abstract member RemoveAnnotation : string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
override this.RemoveAnnotation : string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
Public Function RemoveAnnotation (name As String, Optional fromDataAnnotation As Boolean = false) As IConventionAnnotatableBuilder
Public Overridable Function RemoveAnnotation (name As String, Optional fromDataAnnotation As Boolean = false) As IConventionAnnotatableBuilder

参数

name
String

要删除的批注的名称。

fromDataAnnotation
Boolean

指示是否使用数据注释指定了配置。

返回

IConventionAnnotatableBuilder如果设置了批注,则为继续配置,null否则为继续配置。

特性

适用于