Exemple #1
0
        // 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));
        }
Exemple #2
0
 public IEnumerable <PizzaModel> Pizzas()
 {
     return(pizzas.TodasLasPizzas());
 }