IConventionTypeBaseBuilder.GetOrCreateProperties 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
GetOrCreateProperties(IReadOnlyList<String>, Boolean) |
傳回具有指定名稱的現有屬性,如果找到相符的 CLR 成員,請加以建立。 |
GetOrCreateProperties(IEnumerable<MemberInfo>, Boolean) |
傳回符合指定成員的現有屬性,或建立它們。 |
GetOrCreateProperties(IReadOnlyList<String>, Boolean)
傳回具有指定名稱的現有屬性,如果找到相符的 CLR 成員,請加以建立。
public System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>? GetOrCreateProperties (System.Collections.Generic.IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false);
abstract member GetOrCreateProperties : System.Collections.Generic.IReadOnlyList<string> * bool -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>
Public Function GetOrCreateProperties (propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As IReadOnlyList(Of IConventionProperty)
參數
- propertyNames
- IReadOnlyList<String>
屬性的名稱。
- fromDataAnnotation
- Boolean
指出是否已使用資料批註指定組態。
傳回
如果屬性存在於類型上,則為屬性清單, null
否則為 。
適用於
GetOrCreateProperties(IEnumerable<MemberInfo>, Boolean)
傳回符合指定成員的現有屬性,或建立它們。
public System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>? GetOrCreateProperties (System.Collections.Generic.IEnumerable<System.Reflection.MemberInfo>? memberInfos, bool fromDataAnnotation = false);
abstract member GetOrCreateProperties : seq<System.Reflection.MemberInfo> * bool -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>
Public Function GetOrCreateProperties (memberInfos As IEnumerable(Of MemberInfo), Optional fromDataAnnotation As Boolean = false) As IReadOnlyList(Of IConventionProperty)
參數
- memberInfos
- IEnumerable<MemberInfo>
類型成員。
- fromDataAnnotation
- Boolean
指出是否已使用資料批註指定組態。
傳回
如果屬性存在於類型上,則為屬性清單, null
否則為 。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應