コード例 #1
0
            public async Task <int> Handle(Command request, CancellationToken cancellationToken)
            {
                Domain.Models.CuentaBancaria bankAccount = new Domain.Models.CuentaBancaria()
                {
                    IdUser  = request.IdUser,
                    Pin     = request.Pin,
                    NCuenta = CreditCardFactory.RandomCardNumber(CardIssuer.Visa, 16)
                };
                bankAccount = await _repository.CreateAccountAsync(bankAccount);

                return(bankAccount.Id);
            }