示例#1
0
 public ActionResult UpdateBankAccount(long id, BankAccountViewModel viewModel)
 => _bankAccountCrudHandler
 .Update(id, viewModel.ToDto())
 .Match <ActionResult>(
     Left: err => BadRequest(err.Message),
     Right: c => Ok(FromEntity(c)));
示例#2
0
 public ActionResult CreateBankAccount(BankAccountViewModel viewModel)
 => _bankAccountCrudHandler
 .Create(viewModel.ToDto())
 .Match <ActionResult>(
     Left: err => BadRequest(err.Message),
     Right: Ok);