コード例 #1
0
        public async Task <BuyCurrencyCommand> Map(BuyCurrencyCommandDto source)
        {
            var command = await transactionCommandMapper.Map <BuyCurrencyCommand>(source);

            command.UserMoneyCosts = cantorCostsCalculator.CountUserCostsInPln(command.Currency, source.Amount);
            return(command);
        }
コード例 #2
0
        public async Task <IActionResult> BuyCurrency([FromBody] BuyCurrencyCommandDto command)
        {
            var response = await mediator.Send(command);

            return(Ok(response));
        }