gpt4 book ai didi

c# - Azure 表存储 SaveChanges 返回 "The requested operation is not implemented on the specified resource."

转载 作者:行者123 更新时间:2023-11-30 22:16:31 26 4
gpt4 key购买 nike

在以下 Azure 表对象上调用保存:

public class MyEntity : TableServiceEntity
{
public string Title { get; set; }

public string Description { get; set; }

public float Amount { get; set; }

public DateTime CreatedAt { get; set; }

public DateTime UpdatedAt { get; set; }
}

抛出消息异常:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code>NotImplemented</code>
<message xml:lang="en-US">
The requested operation is not implemented on the specified resource.
RequestId:8d4b648f-64c7-4584-8152-9563c6eb0733
Time:2013-06-25T13:23:22.1722407Z
</message>
</error>

最佳答案

问题是 Azure 存储表没有实现浮点存储。将 amount 类型更改为 double 将解决此问题。

public class MyEntity : TableServiceEntity
{
public string Title { get; set; }

public string Description { get; set; }

public double Amount { get; set; } // <-- Note change here!!!

public DateTime CreatedAt { get; set; }

public DateTime UpdatedAt { get; set; }
}

关于c# - Azure 表存储 SaveChanges 返回 "The requested operation is not implemented on the specified resource.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17298893/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com