Example #1
0
        public async Task Execute(CategoryId id, CategoryDescription description)
        {
            Category category = await _categoryFinder.Execute(id);

            await _categoryRepository.DeleteAsync(category).ConfigureAwait(false);

            await _categoryRepository.SaveChangesAsync().ConfigureAwait(false);

            await _eventBus.Publish(category.PullDomainEvents());
        }
Example #2
0
        public async Task <Category> Execute(CategoryId id)
        {
            Category category = await _categoryFinder.Execute(id);

            return(category);
        }