public async Task <IResult> HandleAsync(UpdateCategoryCommand request) { var category = new Category(request.Id, request.Name); var updatedCategoryEvent = new UpdatedCategoryEvent(category); await _mediator.HandleAsync(updatedCategoryEvent).ConfigureAwait(false); return(Result.Success()); }
public void Handle(UpdatedCategoryEvent message) { // Ação realizada após a inclusão do registro (e-mail ou log, etc) }