Reputation: 2783
I am writing a mobile application in Xamarin with an Azure mobile back-end. I am using MobileServiceClient
to connect to my SQL database in Azure. I have a table in the cloud which I made using Azure's EasyTables
.
I am trying to fetch data from this table using ToListAsync()
which I would like to attach a .Where()
clause to, such that I only fetch data where the user
field in my table is "MyCoolUser".
What should my .Where()
method look like?
Upvotes: 0
Views: 109
Reputation: 24549
What should my .Where() method look like?
As Easy Table supports OData, we could do it with following code:
var user = MobileServiceClient.GetTable<T>().Where(x => x.user=="MyCoolUser").ToListAsync().Result
We could catch the request with fiddler, then could see that filter is
included in the request
Upvotes: 2