EntityTypeConfiguration<TEntityType>.Ignore<TProperty>(Expression<Func<TEntityType,TProperty>>) Method

Definition

Excludes a property from the model so that it will not be mapped to the database.

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

Type Parameters

TProperty

The type of the property to be ignored.

Parameters

propertyExpression
Expression<Func<TEntityType,TProperty>>

A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty

Returns

EntityTypeConfiguration<TEntityType>

The same EntityTypeConfiguration instance so that multiple calls can be chained.

Attributes

Applies to