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