Delen via


RelationalPropertyBuilderExtensions.HasComment Method

Definition

Overloads

HasComment(PropertyBuilder, String)

Configures a comment to be applied to the column

HasComment(IConventionPropertyBuilder, String, Boolean)

Configures a comment to be applied to the column

HasComment<TProperty>(PropertyBuilder<TProperty>, String)

Configures a comment to be applied to the column

HasComment(PropertyBuilder, String)

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

Configures a comment to be applied to the column

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasComment (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, string comment);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasComment (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, string? comment);
static member HasComment : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
<Extension()>
Public Function HasComment (propertyBuilder As PropertyBuilder, comment As String) As PropertyBuilder

Parameters

propertyBuilder
PropertyBuilder

The builder for the property being configured.

comment
String

The comment for the column.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Modeling entity types and relationships for more information and examples.

Applies to

HasComment(IConventionPropertyBuilder, String, Boolean)

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

Configures a comment to be applied to the column

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

Parameters

propertyBuilder
IConventionPropertyBuilder

The builder for the property being configured.

comment
String

The comment for the column.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

Remarks

See Modeling entity types and relationships for more information and examples.

Applies to

HasComment<TProperty>(PropertyBuilder<TProperty>, String)

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

Configures a comment to be applied to the column

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> HasComment<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, string comment);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> HasComment<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, string? comment);
static member HasComment : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
<Extension()>
Public Function HasComment(Of TProperty) (propertyBuilder As PropertyBuilder(Of TProperty), comment As String) As PropertyBuilder(Of TProperty)

Type Parameters

TProperty

The type of the property being configured.

Parameters

propertyBuilder
PropertyBuilder<TProperty>

The builder for the property being configured.

comment
String

The comment for the column.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Modeling entity types and relationships for more information and examples.

Applies to