Table of Contents

Class KeylessAttributeConvention

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

A convention that ignores entity types that have the Microsoft.EntityFrameworkCore.KeylessAttribute.

public class KeylessAttributeConvention : TypeAttributeConventionBase<KeylessAttribute>, IEntityTypeAddedConvention, IConvention
Inheritance
TypeAttributeConventionBase<KeylessAttribute>
KeylessAttributeConvention
Implements
Inherited Members

Remarks

See Model building conventions for more information and examples.

Constructors

KeylessAttributeConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of KeylessAttributeConvention.

public KeylessAttributeConvention(ProviderConventionSetBuilderDependencies dependencies)

Parameters

dependencies ProviderConventionSetBuilderDependencies

Parameter object containing dependencies for this convention.

Methods

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, KeylessAttribute, IConventionContext<IConventionEntityTypeBuilder>)

Called after an entity type is added to the model if it has an attribute.

protected override void ProcessEntityTypeAdded(IConventionEntityTypeBuilder entityTypeBuilder, KeylessAttribute attribute, IConventionContext<IConventionEntityTypeBuilder> context)

Parameters

entityTypeBuilder IConventionEntityTypeBuilder

The builder for the entity type.

attribute KeylessAttribute

The attribute.

context IConventionContext<IConventionEntityTypeBuilder>

Additional information associated with convention execution.