- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用批处理选项将实体保存在 azure 存储表中
这是代码:
foreach (TableEntity entity in entitiesList)
{
ServiceContext.AddObject(entity.getTableName(), entity);
}
ServiceContext.SaveChangesWithRetries(SaveChangesOptions.Batch);
我收到此异常:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code>InvalidInput</code>
<message xml:lang="en-US">99:One of the request inputs is not valid.
RequestId:b54a78fe-30ae-427e-86e9-6107d6e3fe5a
Time:2013-01-14T15:50:17.0134794Z</message>
</error>
但是当我尝试在单独的查询中添加每个实体时,它会起作用
但我不明白的是,当我使用“Azure Storage Explorer”检查azure sotage帐户上的表时,我发现了我正在尝试加载的数据!!
任何人都可以解释为什么我在 azure 表上找到了数据,尽管我有一个异常,以及如何修复它,以便在 ServiceContext.SaveChangesWithRetries 方法中使用批处理选项
提前感谢您的帮助
最佳答案
批量选项仅支持添加最多 100 个只有一个 PartitionKey 的实体。请确保您保存的实体不超过 100 个,并且所有实体都包含一个 key 。
请在此处查找有关批量实体交易的更多信息: http://msdn.microsoft.com/en-us/library/windowsazure/dd894038.aspx
关于c# - ServiceContext.SaveChangesWithRetries 与 SaveChangesOptions.Batch 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14322021/
我正在尝试使用批处理选项将实体保存在 azure 存储表中 这是代码: foreach (TableEntity entity in entitiesList) { ServiceConte
我正在尝试使用批处理选项将实体保存在 azure 存储表中 这是代码: foreach (TableEntity entity in entitiesList) { ServiceConte
我是一名优秀的程序员,十分优秀!