public Task HandleAsync(CategoryCreated payload)
        {
            CategoryEditViewModel viewModel = new CategoryEditViewModel(commandDispatcher, navigator, payload.AggregateKey, payload.Name, null, payload.Color, null);

            Items.Add(viewModel);
            return(Task.CompletedTask);
        }
        private Task UpdateItem(IKey categoryKey, Action <CategoryEditViewModel> handler)
        {
            CategoryEditViewModel viewModel = Items.FirstOrDefault(vm => vm.Key.Equals(categoryKey));

            if (viewModel != null)
            {
                handler(viewModel);
            }

            return(Task.CompletedTask);
        }