Reputation: 8911
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>
Upvotes: 2
Views: 2803
Reputation: 8911
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; }
}
Upvotes: 4