Table of Contents

Class NotMappedMemberAttributeConvention

Namespace
Microsoft.EntityFrameworkCore.Metadata.Conventions
Assembly
Microsoft.EntityFrameworkCore.dll

A convention that ignores members on entity types that have the NotMappedAttribute.

public class NotMappedMemberAttributeConvention : IEntityTypeAddedConvention, IComplexPropertyAddedConvention, IConvention
Inheritance
NotMappedMemberAttributeConvention
Implements
Inherited Members

Remarks

See Model building conventions for more information and examples.

Constructors

NotMappedMemberAttributeConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of NotMappedMemberAttributeConvention.

public NotMappedMemberAttributeConvention(ProviderConventionSetBuilderDependencies dependencies)

Parameters

dependencies ProviderConventionSetBuilderDependencies

Parameter object containing dependencies for this convention.

Properties

Dependencies

Dependencies for this service.

protected virtual ProviderConventionSetBuilderDependencies Dependencies { get; }

Property Value

ProviderConventionSetBuilderDependencies

Methods

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

public void ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder propertyBuilder, IConventionContext<IConventionComplexPropertyBuilder> context)

Parameters

propertyBuilder IConventionComplexPropertyBuilder
context IConventionContext<IConventionComplexPropertyBuilder>

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

public virtual void ProcessEntityTypeAdded(IConventionEntityTypeBuilder entityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder> context)

Parameters

entityTypeBuilder IConventionEntityTypeBuilder
context IConventionContext<IConventionEntityTypeBuilder>

ShouldIgnore(MemberInfo)

Returns a value indicating whether the given CLR member should be ignored.

protected virtual bool ShouldIgnore(MemberInfo memberInfo)

Parameters

memberInfo MemberInfo

The member.

Returns

bool

true if the member should be ignored.