TypeConventionConfiguration<T>.Where 方法
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
根據述詞來篩選套用此慣例的實體類型。
命名空間: System.Data.Entity.ModelConfiguration.Configuration
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
Public Function Where ( _
predicate As Func(Of Type, Boolean) _
) As TypeConventionConfiguration(Of T)
'用途
Dim instance As TypeConventionConfiguration
Dim predicate As Func(Of Type, Boolean)
Dim returnValue As TypeConventionConfiguration(Of T)
returnValue = instance.Where(predicate)
public TypeConventionConfiguration<T> Where(
Func<Type, bool> predicate
)
public:
TypeConventionConfiguration<T>^ Where(
Func<Type^, bool>^ predicate
)
member Where :
predicate:Func<Type, bool> -> TypeConventionConfiguration<'T>
public function Where(
predicate : Func<Type, boolean>
) : TypeConventionConfiguration<T>
參數
- predicate
類型:System.Func<Type, Boolean>
用來測試每個實體類型是否符合條件的函式。
傳回值
類型:System.Data.Entity.ModelConfiguration.Configuration.TypeConventionConfiguration<T>
TypeConventionConfiguration<T> 執行個體,以便鏈結多個呼叫。