IndexAnnotationSerializer 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
此类用于序列化和反序列化 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 中存储。 |