BackingFieldConvention 类

定义

根据属性的名称查找属性的后备字段的约定:

  • <[property name]>k__BackingField
  • _[camel-cased 属性名称]
  • _[property name]
  • m_[camel-cased 属性名称]
  • m_[属性名称]
  • [property name]_
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>)

在将跳过导航添加到实体类型后调用。

适用于