语言

IndexAnnotationSerializer 类

定义

此类用于序列化和反序列化 IndexAnnotation 对象,以便它们可以存储在实体框架模型的 EDMX 形式中。

public class IndexAnnotationSerializer : System.Data.Entity.Infrastructure.IMetadataAnnotationSerializer
type IndexAnnotationSerializer = class
    interface IMetadataAnnotationSerializer
Public Class IndexAnnotationSerializer
Implements IMetadataAnnotationSerializer
继承
IndexAnnotationSerializer
实现

注解

序列化格式的示例为: { Name: 'MyIndex', Order: 7, IsClustered: True, IsUnique: False } { } { Name: 'MyOtherIndex' }。 请注意,尚未在索引属性中显式设置的属性将从序列化输出中排除。 因此,在上面的示例中,第一个索引具有指定的所有属性,第二个索引没有,第三个索引只有名称集。

构造函数

名称 说明
IndexAnnotationSerializer()

此类用于序列化和反序列化 IndexAnnotation 对象,以便它们可以存储在实体框架模型的 EDMX 形式中。

方法

名称 说明
Deserialize(String, String)

将给定字符串反序列化回对象 IndexAnnotation 。

Serialize(String, Object)

将给定 IndexAnnotation 序列化为字符串,以便在 EDMX XML 中存储。

适用于