EntityMappingConfiguration<TEntityType>.Requires Method

Definition

Overloads

Requires(String)

Configures the discriminator column used to differentiate between types in an inheritance hierarchy.

Requires<TProperty>(Expression<Func<TEntityType,TProperty>>)

Configures the discriminator condition used to differentiate between types in an inheritance hierarchy.

Requires(String)

Configures the discriminator column used to differentiate between types in an inheritance hierarchy.

public System.Data.Entity.ModelConfiguration.Configuration.ValueConditionConfiguration Requires (string discriminator);
member this.Requires : string -> System.Data.Entity.ModelConfiguration.Configuration.ValueConditionConfiguration
Public Function Requires (discriminator As String) As ValueConditionConfiguration

Parameters

discriminator
String

The name of the discriminator column.

Returns

A configuration object to further configure the discriminator column and values.

Applies to

Requires<TProperty>(Expression<Func<TEntityType,TProperty>>)

Configures the discriminator condition used to differentiate between types in an inheritance hierarchy.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public System.Data.Entity.ModelConfiguration.Configuration.NotNullConditionConfiguration Requires<TProperty> (System.Linq.Expressions.Expression<Func<TEntityType,TProperty>> property);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public System.Data.Entity.ModelConfiguration.Configuration.NotNullConditionConfiguration Requires<TProperty> (System.Linq.Expressions.Expression<Func<TEntityType,TProperty>> property);
member this.Requires : System.Linq.Expressions.Expression<Func<'EntityType, 'Property>> -> System.Data.Entity.ModelConfiguration.Configuration.NotNullConditionConfiguration
Public Function Requires(Of TProperty) (property As Expression(Of Func(Of TEntityType, TProperty))) As NotNullConditionConfiguration

Type Parameters

TProperty

The type of the property being used to discriminate between types.

Parameters

property
Expression<Func<TEntityType,TProperty>>

A lambda expression representing the property being used to discriminate between types. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty

Returns

A configuration object to further configure the discriminator condition.

Attributes

Applies to