共用方式為


BackingFieldConvention 類別

定義

根據屬性名稱尋找屬性支援欄位的慣例:

  • <[屬性名稱] >k__BackingField
  • _[camel-cased 屬性名稱]
  • _[屬性名稱]
  • m_[camel-cased 屬性名稱]
  • m_[屬性名稱]
  • [屬性名稱]_
public class BackingFieldConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention
public class BackingFieldConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention
public class BackingFieldConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationAddedConvention
public class BackingFieldConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationAddedConvention
type BackingFieldConvention = class
    interface IPropertyAddedConvention
    interface IConvention
    interface INavigationAddedConvention
type BackingFieldConvention = class
    interface IPropertyAddedConvention
    interface IConvention
    interface INavigationAddedConvention
    interface IModelFinalizedConvention
type BackingFieldConvention = class
    interface IPropertyAddedConvention
    interface IConvention
    interface INavigationAddedConvention
    interface ISkipNavigationAddedConvention
    interface IModelFinalizingConvention
type BackingFieldConvention = class
    interface IPropertyAddedConvention
    interface IConvention
    interface INavigationAddedConvention
    interface ISkipNavigationAddedConvention
    interface IComplexPropertyAddedConvention
    interface IModelFinalizingConvention
Public Class BackingFieldConvention
Implements INavigationAddedConvention, IPropertyAddedConvention
Public Class BackingFieldConvention
Implements IModelFinalizedConvention, INavigationAddedConvention, IPropertyAddedConvention
Public Class BackingFieldConvention
Implements IModelFinalizingConvention, INavigationAddedConvention, IPropertyAddedConvention, ISkipNavigationAddedConvention
Public Class BackingFieldConvention
Implements IComplexPropertyAddedConvention, IModelFinalizingConvention, INavigationAddedConvention, IPropertyAddedConvention, ISkipNavigationAddedConvention
繼承
BackingFieldConvention
實作

備註

欄位類型必須是可指派給屬性類型或從屬性類型指派的類型。 如果發現多個相符欄位,則會擲回例外狀況。

如需詳細資訊和範例,請參閱 模型建置慣例

建構函式

BackingFieldConvention(ProviderConventionSetBuilderDependencies)

建立 BackingFieldConvention 的新執行個體。

屬性

Dependencies

此服務的相依性。

方法

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

在複雜屬性新增至類似型別的物件之後呼叫。

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

在模型完成之後呼叫。

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

在完成模型時呼叫。

ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

在導覽新增至實體類型之後呼叫。

ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, IConventionContext<IConventionNavigation>)

在導覽新增至實體類型之後呼叫。

ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

在屬性新增至實體類型之後呼叫。

ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, IConventionContext<IConventionSkipNavigationBuilder>)

在將略過導覽新增至實體類型之後呼叫。

適用於