加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

如何排除一个属性在Azure Table存储中被持久化?

发布时间:2020-12-13 20:19:29 所属栏目:Windows 来源:网络整理
导读:如果我有这样的课程: public class Facet : TableServiceEntity{ public Guid ParentId { get; set; } public string Name { get; set; } public string Uri{ get; set; } public Facet Parent { get; set; }} 父项源自ParentId Guid,该关系旨在由我的存储
如果我有这样的课程:
public class Facet : TableServiceEntity
{
    public Guid ParentId { get; set; }      
    public string Name { get; set; }
    public string Uri{ get; set; }
    public Facet Parent { get; set; }
}

父项源自ParentId Guid,该关系旨在由我的存储库填充.那么我怎么告诉Azure离开这个领域呢?是否有某种类型的Ignore属性,或者是否必须创建一个继承类来提供这些关系?

使用最新的 Microsoft.WindowsAzure.Storage SDK(v6.2.0及更高版本),属性名称已更改为IgnorePropertyAttribute:
public class MyEntity : TableEntity
{
     public string MyProperty { get; set; }

     [IgnoreProperty]
     public string MyIgnoredProperty { get; set; }
}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读