Azure Table Storage SaveChanges returns "The requested operation is not implemented on the specified resource."

StackOverflow https://stackoverflow.com/questions/17298893

Question

Calling save on the following Azure Table Object:

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

Throws an exception with the message:

<?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>
Était-ce utile?

La solution

The problem is that float point storage is not implemented for Azure Storage Tables. Changing the amount type to a double will fix the problem.

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; }
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top