Brett Brett - 1 year ago 72
C# Question

Azure Table Storage - Why are my bool and string properties being stored, but my int and double properties are not?

This sounds like it should be a simple issue, but I am having difficulty singling it out.

I have a

class that I am trying to write to
Azure Table Storage

public class MyEntity : TableEntity
public MyEntity(string imageId, string featureId)
this.PartitionKey = imageId;
this.RowKey = featureId;

public string Container { get; set; }
public bool FeatureEnabled { get; set; }
public int data;
public PointF Point;
public double X;
public double Y;


I understand that my
property will not be saved to Table Storage. But when I insert this entity, the
property and
both get stored, but nothing else?

How can this be?
are said to be supported, so what could I be doing wrong here?

Answer Source

The Container and FeatureEnabled are Properties of the class. The others are simply Fields. TableEntity will only search for and automatically save Properties (of the supported types).

So make data, x, and y into properties by providing get; set; in the same way as the ones that do work.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download