IndexAnnotationSerializer 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
此類別用於序列化與反序列化 IndexAnnotation 物件,使其能以實體框架模型的 EDMX 形式儲存。
public class IndexAnnotationSerializer : System.Data.Entity.Infrastructure.IMetadataAnnotationSerializer
type IndexAnnotationSerializer = class
interface IMetadataAnnotationSerializer
Public Class IndexAnnotationSerializer
Implements IMetadataAnnotationSerializer
- 繼承
-
IndexAnnotationSerializer
- 實作
備註
序列化格式的範例為:{ 名稱:'MyIndex',順序:7,IsClustered:True,IsUnique: False } { } { 名稱:'MyOtherIndex' }。 請注意,未在索引屬性中明確設定的屬性將被排除在序列化輸出中。 在上述範例中,第一個索引指定了所有屬性,第二個索引沒有,第三個索引僅包含名稱集合。
建構函式
| 名稱 | Description |
|---|---|
| IndexAnnotationSerializer() |
此類別用於序列化與反序列化 IndexAnnotation 物件,使其能以實體框架模型的 EDMX 形式儲存。 |
方法
| 名稱 | Description |
|---|---|
| Deserialize(String, String) |
將給定字串反序列化回物件 IndexAnnotation 。 |
| Serialize(String, Object) |
將所給出 IndexAnnotation 的序列化成字串,用於 EDMX XML 儲存。 |