public DeleteTodoItemAsync ( AzureTodo.TodoItem item ) : System.Threading.Tasks.Task | ||
item | AzureTodo.TodoItem | The Item to delete. |
return | System.Threading.Tasks.Task |
public async Task DeleteTodoItemAsync (TodoItem item)
{
try {
await todoTable.DeleteAsync (item);
} catch (MobileServiceInvalidOperationException msioe) {
Debug.WriteLine ("INVALID {0}", msioe.Message);
} catch (Exception e) {
Debug.WriteLine ("ERROR {0}", e.Message);
}
}
#endregion
/// <summary> /// Deletes the given record from Azure. /// </summary> /// <param name="id">Identifier.</param> public async Task Delete(string id) { await manager.DeleteTodoItemAsync(new TodoItem { ID = id }); Reload(); }