ForeignKeyAttributeConvention Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A convention that configures the foreign key properties associated with a navigation property based on the ForeignKeyAttribute specified on the properties or the navigation properties.
public class ForeignKeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention
public class ForeignKeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention
public class ForeignKeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationForeignKeyChangedConvention
public class ForeignKeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationForeignKeyChangedConvention
type ForeignKeyAttributeConvention = class
interface IForeignKeyAddedConvention
interface IConvention
interface IModelFinalizedConvention
type ForeignKeyAttributeConvention = class
interface IForeignKeyAddedConvention
interface IConvention
interface INavigationAddedConvention
interface IModelFinalizingConvention
type ForeignKeyAttributeConvention = class
interface IEntityTypeAddedConvention
interface IConvention
interface IForeignKeyAddedConvention
interface INavigationAddedConvention
interface ISkipNavigationForeignKeyChangedConvention
interface IModelFinalizingConvention
type ForeignKeyAttributeConvention = class
interface IEntityTypeAddedConvention
interface IConvention
interface IForeignKeyAddedConvention
interface INavigationAddedConvention
interface ISkipNavigationForeignKeyChangedConvention
interface IPropertyAddedConvention
interface IComplexPropertyAddedConvention
interface IModelFinalizingConvention
Public Class ForeignKeyAttributeConvention
Implements IForeignKeyAddedConvention, IModelFinalizedConvention
Public Class ForeignKeyAttributeConvention
Implements IForeignKeyAddedConvention, IModelFinalizingConvention, INavigationAddedConvention
Public Class ForeignKeyAttributeConvention
Implements IEntityTypeAddedConvention, IForeignKeyAddedConvention, IModelFinalizingConvention, INavigationAddedConvention, ISkipNavigationForeignKeyChangedConvention
Public Class ForeignKeyAttributeConvention
Implements IComplexPropertyAddedConvention, IEntityTypeAddedConvention, IForeignKeyAddedConvention, IModelFinalizingConvention, INavigationAddedConvention, IPropertyAddedConvention, ISkipNavigationForeignKeyChangedConvention
- Inheritance
-
ForeignKeyAttributeConvention
- Implements
Remarks
For one-to-one relationships the attribute has to be specified on the navigation property pointing to the principal.
See Model building conventions for more information and examples.
Constructors
ForeignKeyAttributeConvention(ProviderConventionSetBuilderDependencies) |
Creates a new instance of ForeignKeyAttributeConvention. |
Properties
Dependencies |
Dependencies for this service. |
Methods
Applies to
Entity Framework