RelationalEntityTypeExtensions.SetComment 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
SetComment(IMutableEntityType, String) |
配置要应用于此实体映射到的表的注释。 |
SetComment(IConventionEntityType, String, Boolean) |
配置要应用于此实体映射到的表的注释。 |
SetComment(IMutableEntityType, String)
配置要应用于此实体映射到的表的注释。
public static void SetComment (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string comment);
public static void SetComment (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string? comment);
static member SetComment : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * string -> unit
<Extension()>
Public Sub SetComment (entityType As IMutableEntityType, comment As String)
参数
- entityType
- IMutableEntityType
实体类型。
- comment
- String
此实体映射到的表的注释。
适用于
SetComment(IConventionEntityType, String, Boolean)
配置要应用于此实体映射到的表的注释。
public static void SetComment (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string comment, bool fromDataAnnotation = false);
public static string SetComment (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string comment, bool fromDataAnnotation = false);
public static string? SetComment (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string? comment, bool fromDataAnnotation = false);
static member SetComment : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * string * bool -> unit
static member SetComment : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * string * bool -> string
<Extension()>
Public Sub SetComment (entityType As IConventionEntityType, comment As String, Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetComment (entityType As IConventionEntityType, comment As String, Optional fromDataAnnotation As Boolean = false) As String
参数
- entityType
- IConventionEntityType
实体类型。
- comment
- String
表的注释。
- fromDataAnnotation
- Boolean
指示配置是否是使用数据注释指定的。
返回
配置的注释。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈