Ejemplo n.º 1
0
        public async Task AddAsync()
        {
            IsBusy = true;
            var item = new TodoItem {
                Name = Name
            };
            await manager.SaveTaskAsync(item);

            Items = await manager.GetTodoItemsAsync();

            Name   = string.Empty;
            IsBusy = false;
        }
        async Task AddAsync()
        {
            IsBusy = true;

            var item = new TodoItem {
                Name = Name
            };

            try
            {
                await manager.SaveTaskAsync(item).ConfigureAwait(false);

                Items = await manager.GetTodoItemsAsync().ConfigureAwait(false);

                Name = string.Empty;
            }
            finally
            {
                IsBusy = false;
            }
        }