RelationalEntityTypeBuilderExtensions.HasComment Method

Definition

Overloads

HasComment(EntityTypeBuilder, String)
Obsolete.

Configures a comment to be applied to the table

HasComment(IConventionEntityTypeBuilder, String, Boolean)

Configures a comment to be applied to the table

HasComment<TEntity>(EntityTypeBuilder<TEntity>, String)
Obsolete.

Configures a comment to be applied to the table

HasComment(EntityTypeBuilder, String)

Caution

Configure this using ToTable(t => t.HasComment()) instead.

Configures a comment to be applied to the table

public static Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder HasComment (this Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder entityTypeBuilder, string comment);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder HasComment (this Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder entityTypeBuilder, string? comment);
[System.Obsolete("Configure this using ToTable(t => t.HasComment()) instead.")]
public static Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder HasComment (this Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder entityTypeBuilder, string? comment);
static member HasComment : Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
[<System.Obsolete("Configure this using ToTable(t => t.HasComment()) instead.")>]
static member HasComment : Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
<Extension()>
Public Function HasComment (entityTypeBuilder As EntityTypeBuilder, comment As String) As EntityTypeBuilder

Parameters

entityTypeBuilder
EntityTypeBuilder

The builder for the entity type being configured.

comment
String

The comment for the table.

Returns

A builder to further configure the entity type.

Attributes

Remarks

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

Applies to

HasComment(IConventionEntityTypeBuilder, String, Boolean)

Configures a comment to be applied to the table

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

Parameters

entityTypeBuilder
IConventionEntityTypeBuilder

The builder for the entity type being configured.

comment
String

The comment for the table.

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<TEntity>(EntityTypeBuilder<TEntity>, String)

Caution

Configure this using ToTable(t => t.HasComment()) instead.

Configures a comment to be applied to the table

public static Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> HasComment<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> entityTypeBuilder, string comment) where TEntity : class;
public static Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> HasComment<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> entityTypeBuilder, string? comment) where TEntity : class;
[System.Obsolete("Configure this using ToTable(t => t.HasComment()) instead.")]
public static Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> HasComment<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> entityTypeBuilder, string? comment) where TEntity : class;
static member HasComment : Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)> (requires 'Entity : null)
[<System.Obsolete("Configure this using ToTable(t => t.HasComment()) instead.")>]
static member HasComment : Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)> (requires 'Entity : null)
<Extension()>
Public Function HasComment(Of TEntity As Class) (entityTypeBuilder As EntityTypeBuilder(Of TEntity), comment As String) As EntityTypeBuilder(Of TEntity)

Type Parameters

TEntity

The entity type being configured.

Parameters

entityTypeBuilder
EntityTypeBuilder<TEntity>

The entity type builder.

comment
String

The comment for the table.

Returns

A builder to further configure the entity type.

Attributes

Remarks

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

Applies to