Im using in my wp8 c# application a cloud database trough Azure Mobile Services. I have two tables that i connected with each other with foreign keys.
In my application i can query them separately like the documentation said:
so i can query my MovieTable like this
private MobileServiceCollection<MovieTable, MovieTable> items;
private IMobileServiceTable<MovieTable> Mtable = App.MobileService.GetTable<MovieTable>();
then in my method:
int selectedId= 13; // its coming from the user interface, not important now
items = await Mtable
.Where(mov => mov.Id == selectedId )
.ToCollectionAsync();
Movietable tb = items[0];
txtTitle.Text = td.Title;
txtlength.Text= td.Length;
So what im looking for is to reach all the data parts of the two table like above
items = await Mtable,ETable (E table is for my Event Table)
.Where(event => event.Id == selectedId && event.Id =Mtable.Id )
.ToCollectionAsync();
Eventtable tb = items[0];
txtTitle.Text = tb.Title;
txtlength.Text= tb.Length;
and the important
txtDate.Text= tb.date;
I know its wrong syntax, but its just for demonstrate what im trying to reach.
in simple sql its looks like
select *
from MovieTable m1,EventTable e1
where m1.id==e1.id
So it is possible somehow through azure mobile service ?
Also i know and i already created view in Azure database management portal, but i dont know how can i reach that view in my application, i cannot found any docs about reaching those views.
How about implementing a custom API for the mobile service? You can do the table join here instead of dragging everything down to the phone... http://blogs.msdn.com/b/carlosfigueira/archive/2013/06/14/custom-apis-in-azure-mobile-services.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With