コード例 #1
0
        public async Task <WalletViewModel> Create(WalletViewModel wallet)
        {
            try
            {
                WalletDTO _wallet = await walletService.CreateAsync(mapper.Map <WalletDTO>(wallet));

                return(mapper.Map <WalletViewModel>(_wallet));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
コード例 #2
0
        public async Task <ActionResult> Create(WalletDTO wallet)
        {
            await walletService.CreateAsync(wallet);

            return(new OkResult());
        }