예제 #1
0
        protected override async Task HandleTransacted(RenameConceptCommand command, CancellationToken cancellationToken = default(CancellationToken))
        {
            var concept = await _conceptRepository.Get(command.ConceptId, cancellationToken);

            if (concept == null)
            {
                throw new EntityNotFoundException("The requested concept was not found.");
            }

            concept.Rename(command.Name);

            await _conceptRepository.Update(concept);
        }