KeyAttributeConvention 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
根據屬性上指定的 或 PrimaryKeyAttribute CLR 型別所指定的 來設定實體類型索引鍵 KeyAttribute 的慣例。
public class KeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.KeyAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention
public class KeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.KeyAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention
public class KeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.KeyAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention
public class KeyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.KeyAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention
type KeyAttributeConvention = class
inherit PropertyAttributeConventionBase<KeyAttribute>
interface IModelFinalizedConvention
interface IConvention
type KeyAttributeConvention = class
inherit PropertyAttributeConventionBase<KeyAttribute>
interface IModelFinalizingConvention
interface IConvention
type KeyAttributeConvention = class
inherit PropertyAttributeConventionBase<KeyAttribute>
interface IModelFinalizingConvention
interface IConvention
interface IEntityTypeAddedConvention
interface IEntityTypeBaseTypeChangedConvention
type KeyAttributeConvention = class
inherit PropertyAttributeConventionBase<KeyAttribute>
interface IModelFinalizingConvention
interface IConvention
interface IEntityTypeAddedConvention
interface IEntityTypeBaseTypeChangedConvention
interface IComplexPropertyAddedConvention
Public Class KeyAttributeConvention
Inherits PropertyAttributeConventionBase(Of KeyAttribute)
Implements IModelFinalizedConvention
Public Class KeyAttributeConvention
Inherits PropertyAttributeConventionBase(Of KeyAttribute)
Implements IModelFinalizingConvention
Public Class KeyAttributeConvention
Inherits PropertyAttributeConventionBase(Of KeyAttribute)
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IModelFinalizingConvention
Public Class KeyAttributeConvention
Inherits PropertyAttributeConventionBase(Of KeyAttribute)
Implements IComplexPropertyAddedConvention, IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IModelFinalizingConvention
- 繼承
- 實作
備註
如需詳細資訊和範例,請參閱 模型建置慣例 。
建構函式
KeyAttributeConvention(ProviderConventionSetBuilderDependencies) |
建立 KeyAttributeConvention 的新執行個體。 |
屬性
Dependencies |
此服務的相依性。 (繼承來源 PropertyAttributeConventionBase<TAttribute>) |