RelationalPropertyExtensions.SetComment 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
SetComment(IConventionProperty, String, Boolean) |
配置要应用于此属性映射到的列的注释。 |
SetComment(IMutableProperty, String) |
配置要应用于此属性映射到的列的注释。 |
SetComment(IConventionProperty, String, Boolean)
配置要应用于此属性映射到的列的注释。
public static void SetComment (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string comment, bool fromDataAnnotation = false);
public static string SetComment (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string comment, bool fromDataAnnotation = false);
public static string? SetComment (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string? comment, bool fromDataAnnotation = false);
static member SetComment : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * string * bool -> unit
static member SetComment : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * string * bool -> string
<Extension()>
Public Sub SetComment (property As IConventionProperty, comment As String, Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetComment (property As IConventionProperty, comment As String, Optional fromDataAnnotation As Boolean = false) As String
参数
- property
- IConventionProperty
属性。
- comment
- String
列的注释。
- fromDataAnnotation
- Boolean
指示配置是否是使用数据注释指定的。
返回
配置的值。
适用于
SetComment(IMutableProperty, String)
配置要应用于此属性映射到的列的注释。
public static void SetComment (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, string comment);
public static void SetComment (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, string? comment);
static member SetComment : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty * string -> unit
<Extension()>
Public Sub SetComment (property As IMutableProperty, comment As String)
参数
- property
- IMutableProperty
属性。
- comment
- String
列的注释。