RelationalPropertyExtensions.SetComment 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| SetComment(IMutableProperty, String) |
配置一個註解,使其套用到該屬性所映射的欄位。 |
| SetComment(IConventionProperty, String, 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
專欄留言。
適用於
SetComment(IConventionProperty, String, Boolean)
配置一個註解,使其套用到該屬性所映射的欄位。
public static string? SetComment(this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string? comment, bool fromDataAnnotation = false);
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);
static member SetComment : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * string * bool -> string
static member SetComment : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * string * bool -> unit
<Extension()>
Public Function SetComment (property As IConventionProperty, comment As String, Optional fromDataAnnotation As Boolean = false) As String
<Extension()>
Public Sub SetComment (property As IConventionProperty, comment As String, Optional fromDataAnnotation As Boolean = false)
參數
- property
- IConventionProperty
屬性。
- comment
- String
專欄留言。
- fromDataAnnotation
- Boolean
表示配置是否以資料註解方式指定。
傳回
設定值。