public IActionResult GetTotalAmount() { //store response var res = _coinJar.GetTotalAmount(); return(StatusCode(res.Code, res)); }
///<remarks> ///Gets the total amount of money in the coinjar ///</remarks> public ActionResult <decimal> GetTotalAmount() { try { return(Ok(_coinJar.GetTotalAmount())); } catch (Exception e) { return(BadRequest(e)); } }
public JsonResult GetTotalAmount() { var data = _coinJar.GetTotalAmount(); return(Json(new { status = "Success", data }, JsonRequestBehavior.AllowGet)); }
public IActionResult Get() { _logger.LogInformation("Getting total amount of coins"); return(Ok(new { TotalAmount = $"${CoinJar.GetTotalAmount().ToString("0.00")}" })); }
protected override GetTotalAmountQueryResponse Handle(GetTotalAmountQuery query) { return(new GetTotalAmountQueryResponse { TotalAmount = _db.GetTotalAmount() }); }
public JsonResult GetTotalCoins() { var result = _coinJarService.GetTotalAmount(); return(Json("Total Amount in Coin Jar: $" + result / 100)); }