c# - Get information from Azure Mobile Service to Windows 8 app -
i developing windows 8 app in c# using azure mobile services. first time have used azure, have figured out how place data tables app. thing can't retrieve single pieces of data based on 1 bit of data in table. example retrieve name mobile service based on id instance.
if want retrieve item based on id, can use lookupasync method:
var table = mobileservice.gettable<mydatatype>(); var item = await table.lookupasync(id); if want retrieve item based on property, can use where clause @sopuli mentioned, don't need create collection if want item itself:
var table = mobileservice.gettable<mydatatype>(); var items = await table.where(d => d.property == propvalue).toenumerableasync(); var item = items.firstordefault();
Comments
Post a Comment