Beispiel #1
0
 public async Task InsertTodoItemAsync(MonkeyItem monkeyItem)
 {
     try {
         // This code inserts a new MonkeyItem into the database. When the operation completes
         // and Mobile Services has assigned an Id, the item is added to the CollectionView
         await monkeyTable.InsertAsync(monkeyItem);
     } catch (MobileServiceInvalidOperationException e) {
         Console.Error.WriteLine(@"ERROR {0}", e.Response);
     }
 }
		public async Task InsertTodoItemAsync (MonkeyItem monkeyItem)
		{
			try {
				// This code inserts a new MonkeyItem into the database. When the operation completes
				// and Mobile Services has assigned an Id, the item is added to the CollectionView
				await monkeyTable.InsertAsync (monkeyItem);

			} catch (MobileServiceInvalidOperationException e) {
				Console.Error.WriteLine (@"ERROR {0}", e.Response);
			}
		}