Hello. I can not think of how to add an ObservableCollection to a table located in the Azure cloud .... I have 2 ObservableCollection Fullorder = new ObservableCollection<order>(); Nickorder = new ObservableCollection<order>(); and tables of the same name in the Azure cloud

I used to do this when I added a demomenu to the table which is in AZURE

 public static MobileServiceClient MobileSerice = new MobileServiceClient("http://mrcoffeservice.azurewebsites.net"); private MobileServiceCollection<demomenu, demomenu> items; private async void addbutn_Click(object sender, RoutedEventArgs e) { demomenu item = new demomenu {name = "Печенька", cost = 150}; await App.MobileService.GetTable<demomenu>().InsertAsync(item); } 

As you can see, I have everything called the same and classes and tables and demomenu collections, and now my collections have different names Fullorder and Nickorder and one order class and 2 PS tables and filled each element manually, and now I have them in collections they look just like tables in Azure, and you just need to take a collection element and interfere with the table because they have the same structure

  • Have you tried GetTable(string) with a name? - VladD
  • I did it like this foreach (var Collection in App.Nickorder) { await App.MobileSerice.GetTable("Nickorder").InsertAsync(Collection); } foreach (var Collection in App.Nickorder) { await App.MobileSerice.GetTable("Nickorder").InsertAsync(Collection); } but then he says he can't convert the Collection into Newtonsoft.Json.Linq.JObject - Denis Krovyakov
  • Well, is this another kind of problem? What type is your Collection in this case? Send to the right type, if that. - VladD

0