【问题标题】:Migrating from TableServiceContext to CloudTable从 TableServiceContext 迁移到 CloudTable
【发布时间】:2016-08-27 22:38:46
【问题描述】:

由于以下警告(从旧版本迁移到最新的 Azure SDK),我正在将我的 Azure 代码从使用 TableServiceContext 迁移到 CloudTable

'Microsoft.WindowsAzure.Storage.Table.DataServices.TableServiceEntity' 已过时:'通过 WCF 数据服务访问 Windows Azure 表的支持现已过时。建议您使用 Microsoft.WindowsAzure.Storage.Table 命名空间来处理表。'

其中一个问题是在 TableServiceContext 中我使用了以下内容

_tableServiceContext.MergeOption = MergeOption.NoTracking;
_tableServiceContext.SaveChangesDefaultOptions =      SaveChangesOptions.ReplaceOnUpdate;
_tableServiceContext.IgnoreResourceNotFoundException = true;
_tableServiceContext.Format.UseAtom();
_tableServiceContext.WritingEntity += JobRepository_WritingEntity;

新 SDK 中的等价物是什么?

【问题讨论】:

  • 你能分享你试过的代码吗?与您从中得到的错误等...
  • 这里其实没什么可分享的,需要的我都分享了。

标签: azure-storage azure-table-storage


【解决方案1】:

这些属性特定于 ServiceContext 的行为,不适用于使用 CloudTable 类。

【讨论】:

    猜你喜欢
    • 2013-08-26
    • 1970-01-01
    • 2012-12-04
    • 2011-04-26
    • 2015-07-23
    • 2020-05-31
    • 2010-10-26
    • 2022-01-14
    • 2016-09-27
    相关资源
    最近更新 更多