public ActionResult GetOrdersAjax() { var repo = new IceCreamRepository(); IEnumerable <IceCream> orders = repo.GetOrders(); return(Json(orders, JsonRequestBehavior.AllowGet)); }
public ActionResult GetOrders() { var repo = new IceCreamRepository(); IEnumerable <IceCream> orders = repo.GetOrders(); return(View(orders)); }