SqlServerMemoryOptimizedTablesConvention 类

定义

为内存优化表将索引配置为非聚集索引的约定。

public class SqlServerMemoryOptimizedTablesConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IIndexAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IKeyAddedConvention
type SqlServerMemoryOptimizedTablesConvention = class
    interface IEntityTypeAnnotationChangedConvention
    interface IConvention
    interface IKeyAddedConvention
    interface IIndexAddedConvention
Public Class SqlServerMemoryOptimizedTablesConvention
Implements IEntityTypeAnnotationChangedConvention, IIndexAddedConvention, IKeyAddedConvention
继承
SqlServerMemoryOptimizedTablesConvention
实现

注解

有关详细信息和示例,请参阅模型构建约定和使用 EF Core 访问SQL Server和Azure SQL数据库

构造函数

SqlServerMemoryOptimizedTablesConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

创建 SqlServerMemoryOptimizedTablesConvention 的新实例。

属性

Dependencies

此服务的依赖项。

RelationalDependencies

此服务的关系提供程序特定的依赖项。

方法

ProcessEntityTypeAnnotationChanged(IConventionEntityTypeBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

在实体类型上更改批注后调用。

ProcessIndexAdded(IConventionIndexBuilder, IConventionContext<IConventionIndexBuilder>)

在将索引添加到实体类型后调用。

ProcessKeyAdded(IConventionKeyBuilder, IConventionContext<IConventionKeyBuilder>)

在将键添加到实体类型后调用。

适用于