Exemplo n.º 1
0
        public async Task Handle(CreatePoemForPersonEventContext @event)
        {
            var createPoem = new CreatePoemContext(@event.PersonId);
            await commandBuilder.ExecuteAsync(createPoem);

            var estimatePoem = new EstimatePoemContext(createPoem.IdAfterCreate);
            await commandBuilder.ExecuteAsync(estimatePoem);
        }
Exemplo n.º 2
0
        public async Task <IActionResult> CreatePoemForPerson(long personId)
        {
            var createPoem = new CreatePoemContext(personId);
            await commandBuilder.ExecuteAsync(createPoem);

            var estimatePoem = new EstimatePoemContext(createPoem.IdAfterCreate);
            await commandBuilder.ExecuteAsync(estimatePoem);

            return(Ok());
        }