How to use CloudFX to query Azure Table storage -
we have spent time researching through google understand how query our azure table (on storage emulator setting) using cloudfx library, there no example available shows how works.
here simple function have written
public t gettablerecord<t>(string tablename, string partitionkey, string rowkey) t : tableentity { using (var tablestorage = extensions.find<icloudstorageproviderextension>().defaulttablestorage) { var qry = tablestorage.get<t>(tablename, partitionkey, rowkey); var result = qry.???? } }
no matter try qry.???
throws exception cannot cast iqueryable(t)
can understand how can use method.
edit1:
to clarify error, this:
var entity = tablestorage.get<myentity>("table", "partition").firstordefault(); throws following exception: expression of type 'system.linq.iorderedqueryable`1[microsoft.windowsazure.storage.table.dynamictableentity]' cannot used parameter of type 'system.linq.iqueryable`1[cloudfxtest.myentity]' of method 'cloudfxtest.myentity firstordefault[myentity](system.linq.iqueryable`1[cloudfxtest.myentity])'
regards kiran
looks me iqueryable
not supported, got working using qry.tolist()
in case if helps anyone.
Comments
Post a Comment