public ActionResult GetExpenses(string userName) { if (ModelState.IsValid) { var results = ExpenseManager.GetExpenseItems(userName); return(Json(results, JsonRequestBehavior.AllowGet)); } else { return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); }; }