ComplexPropertyBuilder.ComplexProperty 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| ComplexProperty(Type, String, String, Action<ComplexPropertyBuilder>) |
配置一個複數屬性的複數屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。 |
| ComplexProperty(Type, String, String) |
回傳一個物件,可用來配置複雜型態的複雜屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。 |
| ComplexProperty(Type, String, Action<ComplexPropertyBuilder>) |
配置一個複數屬性的複數屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。 |
| ComplexProperty(String, Action<ComplexPropertyBuilder>) |
配置一個複數屬性的複數屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。 |
| ComplexProperty(String) |
回傳一個物件,可用來配置複雜型態的複雜屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。 |
| ComplexProperty(Type, String) |
回傳一個物件,可用來配置複雜型態的複雜屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。 |
| ComplexProperty<TProperty>(String) |
回傳一個物件,可用來配置複雜型態的複雜屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。 |
| ComplexProperty<TProperty>(String, Action<ComplexPropertyBuilder<TProperty>>) |
配置一個複數屬性的複數屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。 |
| ComplexProperty<TProperty>(String, String) |
回傳一個物件,可用來配置複雜型態的複雜屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。 |
| ComplexProperty<TProperty>(String, String, Action<ComplexPropertyBuilder<TProperty>>) |
配置一個複數屬性的複數屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。 |
ComplexProperty(Type, String, String, Action<ComplexPropertyBuilder>)
配置一個複數屬性的複數屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty(Type propertyType, string propertyName, string complexTypeName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> buildAction);
abstract member ComplexProperty : Type * string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : Type * string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty (propertyType As Type, propertyName As String, complexTypeName As String, buildAction As Action(Of ComplexPropertyBuilder)) As ComplexPropertyBuilder
參數
- propertyType
- Type
要設定的財產類型。
- propertyName
- String
要設定的物業名稱。
- complexTypeName
- String
複雜類型的名稱。
- buildAction
- Action<ComplexPropertyBuilder>
一個執行屬性配置的動作。
傳回
同一個建構器實例,這樣可以串接多個設定呼叫。
備註
新增複數屬性時,若複數類別中有同名屬性,則該物件會被加入模型中。 若複數類別中不存在性質,則會新增一個影子狀態複數性質。 影子狀態性質是指在複數類別中沒有對應性質的性質。 屬性的當前值會儲存在 中 ChangeTracker ,而非存放在複雜類別的實例中。
適用於
ComplexProperty(Type, String, String)
回傳一個物件,可用來配置複雜型態的複雜屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty(Type propertyType, string propertyName, string complexTypeName);
abstract member ComplexProperty : Type * string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : Type * string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty (propertyType As Type, propertyName As String, complexTypeName As String) As ComplexPropertyBuilder
參數
- propertyType
- Type
要設定的財產類型。
- propertyName
- String
要設定的物業名稱。
- complexTypeName
- String
複雜類型的名稱。
傳回
一個可以用來設定屬性的物件。
備註
新增複數屬性時,若複數類別中有同名屬性,則該物件會被加入模型中。 若複數類別中不存在性質,則會新增一個影子狀態複數性質。 影子狀態性質是指在複數類別中沒有對應性質的性質。 屬性的當前值會儲存在 中 ChangeTracker ,而非存放在複雜類別的實例中。
適用於
ComplexProperty(Type, String, Action<ComplexPropertyBuilder>)
配置一個複數屬性的複數屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty(Type propertyType, string propertyName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> buildAction);
abstract member ComplexProperty : Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty (propertyType As Type, propertyName As String, buildAction As Action(Of ComplexPropertyBuilder)) As ComplexPropertyBuilder
參數
- propertyType
- Type
要設定的財產類型。
- propertyName
- String
要設定的物業名稱。
- buildAction
- Action<ComplexPropertyBuilder>
一個執行屬性配置的動作。
傳回
同一個建構器實例,這樣可以串接多個設定呼叫。
備註
新增複數屬性時,若複數類別中有同名屬性,則該物件會被加入模型中。 若複數類別中不存在性質,則會新增一個影子狀態複數性質。 影子狀態性質是指在複數類別中沒有對應性質的性質。 屬性的當前值會儲存在 中 ChangeTracker ,而非存放在複雜類別的實例中。
適用於
ComplexProperty(String, Action<ComplexPropertyBuilder>)
配置一個複數屬性的複數屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty(string propertyName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> buildAction);
abstract member ComplexProperty : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty (propertyName As String, buildAction As Action(Of ComplexPropertyBuilder)) As ComplexPropertyBuilder
參數
- propertyName
- String
要設定的物業名稱。
- buildAction
- Action<ComplexPropertyBuilder>
一個執行屬性配置的動作。
傳回
同一個建構器實例,這樣可以串接多個設定呼叫。
備註
新增帶有此過載的屬性時,屬性名稱必須與複雜型態中 CLR 屬性或欄位的名稱相符。 此過載無法用來新增陰影狀態複體屬性。
適用於
ComplexProperty(String)
回傳一個物件,可用來配置複雜型態的複雜屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty(string propertyName);
abstract member ComplexProperty : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty (propertyName As String) As ComplexPropertyBuilder
參數
- propertyName
- String
要設定的物業名稱。
傳回
一個可以用來設定屬性的物件。
備註
新增帶有此過載的屬性時,屬性名稱必須與複雜型態中 CLR 屬性或欄位的名稱相符。 此過載無法用來新增陰影狀態複體屬性。
適用於
ComplexProperty(Type, String)
回傳一個物件,可用來配置複雜型態的複雜屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty(Type propertyType, string propertyName);
abstract member ComplexProperty : Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty (propertyType As Type, propertyName As String) As ComplexPropertyBuilder
參數
- propertyType
- Type
要設定的財產類型。
- propertyName
- String
要設定的物業名稱。
傳回
一個可以用來設定屬性的物件。
備註
新增複數屬性時,若複數類別中有同名屬性,則該物件會被加入模型中。 若複數類別中不存在性質,則會新增一個影子狀態複數性質。 影子狀態性質是指在複數類別中沒有對應性質的性質。 屬性的當前值會儲存在 中 ChangeTracker ,而非存放在複雜類別的實例中。
適用於
ComplexProperty<TProperty>(String)
回傳一個物件,可用來配置複雜型態的複雜屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty> ComplexProperty<TProperty>(string propertyName);
abstract member ComplexProperty : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>
override this.ComplexProperty : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>
Public Overridable Function ComplexProperty(Of TProperty) (propertyName As String) As ComplexPropertyBuilder(Of TProperty)
類型參數
- TProperty
要設定的財產類型。
參數
- propertyName
- String
要設定的物業名稱。
傳回
一個可以用來設定屬性的物件。
備註
新增屬性時,如果複合類別中存在同名屬性,則該屬性會被加入模型中。 若複數類別中不存在性質,則會新增一個影子狀態複數性質。 影子狀態性質是指在複數類別中沒有對應性質的性質。 屬性的當前值會儲存在 中 ChangeTracker ,而非存放在複雜類別的實例中。
適用於
ComplexProperty<TProperty>(String, Action<ComplexPropertyBuilder<TProperty>>)
配置一個複數屬性的複數屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty<TProperty>(string propertyName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty>> buildAction);
abstract member ComplexProperty : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty(Of TProperty) (propertyName As String, buildAction As Action(Of ComplexPropertyBuilder(Of TProperty))) As ComplexPropertyBuilder
類型參數
- TProperty
要設定的財產類型。
參數
- propertyName
- String
要設定的物業名稱。
- buildAction
- Action<ComplexPropertyBuilder<TProperty>>
一個執行屬性配置的動作。
傳回
同一個建構器實例,這樣可以串接多個設定呼叫。
備註
新增屬性時,如果複合類別中存在同名屬性,則該屬性會被加入模型中。 若複數類別中不存在性質,則會新增一個影子狀態複數性質。 影子狀態性質是指在複數類別中沒有對應性質的性質。 屬性的當前值會儲存在 中 ChangeTracker ,而非存放在複雜類別的實例中。
適用於
ComplexProperty<TProperty>(String, String)
回傳一個物件,可用來配置複雜型態的複雜屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty> ComplexProperty<TProperty>(string propertyName, string complexTypeName);
abstract member ComplexProperty : string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>
override this.ComplexProperty : string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>
Public Overridable Function ComplexProperty(Of TProperty) (propertyName As String, complexTypeName As String) As ComplexPropertyBuilder(Of TProperty)
類型參數
- TProperty
要設定的財產類型。
參數
- propertyName
- String
要設定的物業名稱。
- complexTypeName
- String
複雜類型的名稱。
傳回
一個可以用來設定屬性的物件。
備註
新增屬性時,如果複合類別中存在同名屬性,則該屬性會被加入模型中。 若複數類別中不存在性質,則會新增一個影子狀態複數性質。 影子狀態性質是指在複數類別中沒有對應性質的性質。 屬性的當前值會儲存在 中 ChangeTracker ,而非存放在複雜類別的實例中。
適用於
ComplexProperty<TProperty>(String, String, Action<ComplexPropertyBuilder<TProperty>>)
配置一個複數屬性的複數屬性。 若不存在帶有該名稱的屬性,則會新增一個屬性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty<TProperty>(string propertyName, string complexTypeName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty>> buildAction);
abstract member ComplexProperty : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty(Of TProperty) (propertyName As String, complexTypeName As String, buildAction As Action(Of ComplexPropertyBuilder(Of TProperty))) As ComplexPropertyBuilder
類型參數
- TProperty
要設定的財產類型。
參數
- propertyName
- String
要設定的物業名稱。
- complexTypeName
- String
複雜類型的名稱。
- buildAction
- Action<ComplexPropertyBuilder<TProperty>>
一個執行屬性配置的動作。
傳回
同一個建構器實例,這樣可以串接多個設定呼叫。
備註
新增屬性時,如果複合類別中存在同名屬性,則該屬性會被加入模型中。 若複數類別中不存在性質,則會新增一個影子狀態複數性質。 影子狀態性質是指在複數類別中沒有對應性質的性質。 屬性的當前值會儲存在 中 ChangeTracker ,而非存放在複雜類別的實例中。