Azure表存储SaveChanges返回“请求的操作未在指定的资源上实现”。

问题描述:

调用save以下天青表对象:Azure表存储SaveChanges返回“请求的操作未在指定的资源上实现”。

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; } 
}