CosmosEntityTypeExtensions.SetContainingPropertyName 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
SetContainingPropertyName(IMutableEntityType, String) |
設定實體類型所對應的父屬性名稱。 |
SetContainingPropertyName(IConventionEntityType, String, Boolean) |
設定實體類型所對應的父屬性名稱。 |
SetContainingPropertyName(IMutableEntityType, String)
設定實體類型所對應的父屬性名稱。
public static void SetContainingPropertyName (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string name);
public static void SetContainingPropertyName (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string? name);
static member SetContainingPropertyName : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * string -> unit
<Extension()>
Public Sub SetContainingPropertyName (entityType As IMutableEntityType, name As String)
參數
- entityType
- IMutableEntityType
要為其設定包含屬性名稱的實體類型。
- name
- String
要設定的名稱。
適用於
SetContainingPropertyName(IConventionEntityType, String, Boolean)
設定實體類型所對應的父屬性名稱。
public static void SetContainingPropertyName (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string name, bool fromDataAnnotation = false);
public static void SetContainingPropertyName (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string? name, bool fromDataAnnotation = false);
public static string? SetContainingPropertyName (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string? name, bool fromDataAnnotation = false);
static member SetContainingPropertyName : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * string * bool -> unit
static member SetContainingPropertyName : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * string * bool -> string
<Extension()>
Public Sub SetContainingPropertyName (entityType As IConventionEntityType, name As String, Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetContainingPropertyName (entityType As IConventionEntityType, name As String, Optional fromDataAnnotation As Boolean = false) As String
參數
- entityType
- IConventionEntityType
要為其設定包含屬性名稱的實體類型。
- name
- String
要設定的名稱。
- fromDataAnnotation
- Boolean
指出是否已使用資料批註指定組態。