RelationalPropertyBuilderExtensions.CanSetComment 方法

定义

重载

CanSetComment(IConventionPropertyBuilder, Object, Boolean)

返回一个值,该值指示是否可以将给定值设置为列的注释。

CanSetComment(IConventionPropertyBuilder, String, Boolean)

返回一个值,该值指示是否可以将给定值设置为列的注释。

CanSetComment(IConventionPropertyBuilder, Object, Boolean)

Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs

返回一个值,该值指示是否可以将给定值设置为列的注释。

public static bool CanSetComment (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, object comment, bool fromDataAnnotation = false);
static member CanSetComment : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder * obj * bool -> bool
<Extension()>
Public Function CanSetComment (propertyBuilder As IConventionPropertyBuilder, comment As Object, Optional fromDataAnnotation As Boolean = false) As Boolean

参数

propertyBuilder
IConventionPropertyBuilder

要配置的属性的生成器。

comment
Object

列的注释。

fromDataAnnotation
Boolean

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

返回

true 如果给定值可以设置为列的默认值,则为 。

适用于

CanSetComment(IConventionPropertyBuilder, String, Boolean)

Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs
Source:
RelationalPropertyBuilderExtensions.cs

返回一个值,该值指示是否可以将给定值设置为列的注释。

public static bool CanSetComment (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, string comment, bool fromDataAnnotation = false);
public static bool CanSetComment (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, string? comment, bool fromDataAnnotation = false);
static member CanSetComment : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder * string * bool -> bool
<Extension()>
Public Function CanSetComment (propertyBuilder As IConventionPropertyBuilder, comment As String, Optional fromDataAnnotation As Boolean = false) As Boolean

参数

propertyBuilder
IConventionPropertyBuilder

要配置的属性的生成器。

comment
String

列的注释。

fromDataAnnotation
Boolean

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

返回

true 如果给定值可以设置为列的默认值,则为 。

注解

有关详细信息和示例,请参阅 为实体类型和关系建模

适用于