Share via


TypeConventionConfiguration<T>.Having<TValue> Method

Definition

Filters the entity types that this convention applies to based on a predicate while capturing a value to use later during configuration.

public System.Data.Entity.ModelConfiguration.Configuration.TypeConventionWithHavingConfiguration<T,TValue> Having<TValue> (Func<Type,TValue> capturingPredicate) where TValue : class;
member this.Having : Func<Type, 'Value (requires 'Value : null)> -> System.Data.Entity.ModelConfiguration.Configuration.TypeConventionWithHavingConfiguration<'T, 'Value (requires 'T : null and 'Value : null)> (requires 'Value : null)
Public Function Having(Of TValue As Class) (capturingPredicate As Func(Of Type, TValue)) As TypeConventionWithHavingConfiguration(Of T, TValue)

Type Parameters

TValue

Type of the captured value.

Parameters

capturingPredicate
Func<Type,TValue>

A function to capture a value for each entity type. If the value is null, the entity type will be filtered out.

Returns

An TypeConventionWithHavingConfiguration<T,TValue> instance so that multiple calls can be chained.

Applies to