Exemplo n.º 1
0
        public async Task <Result> Handle(UpsertRecipientCommand request, CancellationToken cancellationToken)
        {
            using (_database)
            {
                var builtRecipient = Recipient.Build(request.Name, request.Address, request.Verified);
                await _database.Execute(_insertStatement, new { builtRecipient.Id, builtRecipient.Name, builtRecipient.Address, builtRecipient.Verified });;

                return(Result.Success());
            }
        }