public async Task <IActionResult> Debit(BonusCardMoneyView model) { if (model is null) { return(NotFound()); } try { BonusCard card = await _debit.DebitAsync(model); return(RedirectToAction("View", new { controller = "Client", id = card.Client.Id })); } catch (CardNotFoundException) { return(NotFound()); } }
public async Task <IActionResult> Debit(Guid id) { if (id == null || id == Guid.Empty) { return(NotFound()); } try { var card = await _getBonusCard.GetBonusCardAsync(id); BonusCardMoneyView model = new BonusCardMoneyView() { Card = card }; return(View(model)); } catch (CardNotFoundException) { return(NotFound()); } }