If I want to save binary to Azure Table, when I create a class inherited by TableServiceEntity, whats the datatype should I use? and how to check the length for the datatype to insure its not over 64k
public class SomeEntity : TableServiceEntity
{
public whattype BinaryData { get; set; }
}
For binary, a byte[] of length <= 64K is all that is necessary. The table storage client will convert it into Base64 for transport purposes only but storage will be in binary.
If you want to store more than 64K you can split it across multiple columns.
I have written an alternate Azure table storage client, Lucifure Stash, which supports large data columns > 64K, arrays, enums, serialization, public and private properties and fields and more. It is open sourced and available at http://lucifurestash.codeplex.com and via NuGet.