I added the vanilla mobile service, completely selecting the default values. This is the .Net backend using the new 20 MB database on an existing server that I use in Northern Europe. I created an empty application for the Windows Store, added a package of mobile devices for mobile devices, and then followed the instructions to connect my MobileService to my application by adding MobileServicesClient to the App.xaml class. Then I added a button with an event handler. The handler calls the async function to insert the TodoItem object into the database.
App.xaml.cs
public static MobileServiceClient MobileService = new MobileServiceClient(
"https://???.azure-mobile.net/",
"???");
I replaced the URI and Token with. The one I used came from my Azure Portal for this mobile service.
MainPage.xaml.cs
private void Button_Click(object sender, RoutedEventArgs e)
{
CreateItem();
}
private async void CreateItem()
{
TodoItem item = new TodoItem { Text = "Sort This", Complete = false };
try
{
await App.MobileService.GetTable<TodoItem>().InsertAsync(item);
}
catch(MobileServiceInvalidOperationException ex1)
{
Debug.WriteLine(ex1.Message);
}
catch(Exception ex)
{
Debug.WriteLine(ex.Message);
}
}
, MobileServiceInvalidOperationException:
"{" . ( ) "}"
VS2013, 2 WindowsAzure.MobileServices 1.2.3.
MobileService, https://MyMobileService.azure-mobile.net/, , "Check It Out", (MyMobileService Uri).
- , - 404.
, Windows Phone, ...
, - Azure , .
.
.