コード例 #1
0
        public async Task <ActionResult <DebtDto> > GetDebtById(long id)
        {
            var vm = await _debtService.GetDebtById(id);

            if (vm == null)
            {
                return(BadRequest(Result.Failure(new List <string> {
                    "No valid debt was found"
                })));
            }

            return(Ok(vm));
        }
コード例 #2
0
 public async Task <IActionResult> GetSingle(int id)
 {
     return(Ok(await _debtService.GetDebtById(id)));
 }