public async Task <Read.BankInfo> CreateBankInfoAsync(Write.BankInfo bankInfo)
        {
            var bankDataModel = new Data.Model.BankInfo {
                BankCode = bankInfo.BankCode, Url = bankInfo.Url
            };

            _context.BankInfos.Add(bankDataModel);
            await _context.SaveChangesAsync();

            return(ConvertBankInfoDataModelToReadModel(bankDataModel));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult <BankInfo> > PostBankInfoAsync(Write.BankInfo bankInfo)
        {
            var bankInfoReadModel = await _bankInfoService.CreateBankInfoAsync(bankInfo);

            return(CreatedAtAction(nameof(GetBankInfoAsync), new { id = bankInfoReadModel.Id }, bankInfoReadModel));
        }