コード例 #1
0
    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());
    }
コード例 #2
0
 public void Handle(UpdatedCategoryEvent message)
 {
     // Ação realizada após a inclusão do registro (e-mail ou log, etc)
 }