We're switching over from Lokad to CloudFx to handle putting things in/out of table storage.
With Lokad, we had 3 entities:
1) Object 1, which added partition key and row key to
2) Object 2 which had a bunch of properties as well as an instance of
3) Object 3, which had its own set of properties
As far as I can tell, the only way for CloudFx to input that info into table storage is to flatten that whole thing out with one massive object that has all the properties of the previous three objects. With Lokad, we could just useSkinny=true.
Thoughts?
This is the method we ended up implementing. Short version: serialize object 2 and stuff it into the Value property of Object 1, then put in table storage.
Object 1:
Object 2:
Object 3 can be whatever...the address in this case perhaps...it all gets serialized.
So in code you can get the table as follows (more than 1 way to do this):
Then let's say you have an instance of store() you want to put in table storage:
You can do so in the following way:
The entity put in table storage will have all the properties of the CloudEntity class (row key, partition key, etc) and in the "Value" column there will be the json of the object you wanted to store. It's easily readable through Azure Storage Explorer which is nice too.
To get the object back out, use something like this:
Then you can deserialize the "Value" field of those into the object you're expecting:
If you're getting a bunch back, just make myStore a list and loop through the cloudEntities, deserializing and adding each to your list.
Hope this helps!