TypeConventionConfiguration.Having<T> 方法
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
在擷取值以供稍後設定期間使用時,根據述詞來篩選套用此慣例的實體類型。
命名空間: System.Data.Entity.ModelConfiguration.Configuration
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
Public Function Having(Of T As Class) ( _
capturingPredicate As Func(Of Type, T) _
) As TypeConventionWithHavingConfiguration(Of T)
'用途
Dim instance As TypeConventionConfiguration
Dim capturingPredicate As Func(Of Type, T)
Dim returnValue As TypeConventionWithHavingConfiguration(Of T)
returnValue = instance.Having(capturingPredicate)
public TypeConventionWithHavingConfiguration<T> Having<T>(
Func<Type, T> capturingPredicate
)
where T : class
public:
generic<typename T>
where T : ref class
TypeConventionWithHavingConfiguration<T>^ Having(
Func<Type^, T>^ capturingPredicate
)
member Having :
capturingPredicate:Func<Type, 'T> -> TypeConventionWithHavingConfiguration<'T> when 'T : not struct
JScript does not support generic types and methods.
類型參數
- T
所擷取值的類型。
參數
- capturingPredicate
類型:System.Func<Type, T>
函數,用於擷取每個實體類型的值。 如果此值為 null,就會篩選出該實體類型。
傳回值
類型:System.Data.Entity.ModelConfiguration.Configuration.TypeConventionWithHavingConfiguration<T>
TypeConventionWithHavingConfiguration<T> 執行個體,以便鏈結多個呼叫。