i tried get the object id from the email, can i do that in IMobileServiceTableQuery, so if i write my query in sql server it will be something like this
SELECT id from Member where email = '[email protected]'
,so how to do that in IMobileServiceTableQuery , as far i know only with this IMobileServiceTableQuery<T> Where(Expression<Func<T, bool>> predicate);
, but i dont know how to implement it.
ok i try with this code, is this code right ?
public async void GetId(AuthenticationResult result)
{
var client = new MobileServiceClient(Constants.ApplicationURL);
IMobileServiceTable<Member> onlineTable = client.GetTable<Member>();
var items = await onlineTable
.Where(t => t.email == "[email protected]") // HardCode
.Select(t => t.Id).ToListAsync();
}
and how to display the id that i get, can i use like this txtid.Text = t.Id; ?
You can try for the similar code as below:
If you are using Node.js backend, you can check this article: https://developer.xamarin.com/guides/xamarin-forms/cloud-services/consuming/azure/. You can use code as below:
Reference: https://adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/chapter3/client/.