// GET: Pizzas public ActionResult Index(bool?isjson) { var model = pizzas.TodasLasPizzas(); if (isjson.HasValue && isjson.Value) { var json = new JsonResult(); json.Data = model; json.JsonRequestBehavior = JsonRequestBehavior.AllowGet; return(json); } return(View(model)); }
public IEnumerable <PizzaModel> Pizzas() { return(pizzas.TodasLasPizzas()); }