语言

ConventionsConfiguration 类

定义

允许自定义实例使用的 DbModelBuilder 约定。 可以在 System.Data.Entity.ModelConfiguration.Conventions 命名空间中找到默认约定。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
public class ConventionsConfiguration
public class ConventionsConfiguration
type ConventionsConfiguration = class
Public Class ConventionsConfiguration
继承
ConventionsConfiguration
特性

方法

名称 说明
Add(IConvention[])

启用一个或多个约定 DbModelBuilder。

Add<TConvention>()

为 . DbModelBuilder启用约定。

AddAfter<TExistingConvention>(IConvention)

为 . DbModelBuilder启用约定。 此约定将在指定的约定之后运行。

AddBefore<TExistingConvention>(IConvention)

为 . DbModelBuilder启用配置约定。 此约定将在指定的约定之前运行。

AddFromAssembly(Assembly)

发现给定程序集中的所有约定并将其添加到 .DbModelBuilder

Equals(Object)

允许自定义实例使用的 DbModelBuilder 约定。 可以在 System.Data.Entity.ModelConfiguration.Conventions 命名空间中找到默认约定。

GetHashCode()

允许自定义实例使用的 DbModelBuilder 约定。 可以在 System.Data.Entity.ModelConfiguration.Conventions 命名空间中找到默认约定。

GetType()

获取当前实例的 Type。

Remove(IConvention[])

禁用一个或多个约定 DbModelBuilder。

Remove<TConvention>()

禁用该约定 DbModelBuilder。 可在 System.Data.Entity.ModelConfiguration.Conventions 命名空间中找到可用于删除的默认约定。

ToString()

允许自定义实例使用的 DbModelBuilder 约定。 可以在 System.Data.Entity.ModelConfiguration.Conventions 命名空间中找到默认约定。

适用于