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 命名空间中找到默认约定。

适用于