AzureTodo.TodoItemManager.SaveTodoItemAsync C# (CSharp) Method

SaveTodoItemAsync() public method

Saves the todo item to Azure storage async.
public SaveTodoItemAsync ( AzureTodo.TodoItem item ) : System.Threading.Tasks.Task
item AzureTodo.TodoItem The Item to save.
return System.Threading.Tasks.Task
		public async Task SaveTodoItemAsync (TodoItem item)
		{
			if (item.ID == null)
				await todoTable.InsertAsync (item);
			else
				await todoTable.UpdateAsync (item);
		}

Usage Example

示例#1
0
        /// <summary>
        /// Adds the new todo item.
        /// </summary>
        /// <param name="sender">Sender.</param>
        async partial void addNewTodoItem(Foundation.NSObject sender)
        {
            // Create a new item and save it to Azure
            var newTodo = new TodoItem {
                Name = newTodoItemName.StringValue
            };
            await manager.SaveTodoItemAsync(newTodo);

            // Update the interface
            await Reload();

            newTodoItemName.StringValue = "";
        }
All Usage Examples Of AzureTodo.TodoItemManager::SaveTodoItemAsync