コード例 #1
0
        // GET: Product
        public ActionResult Details(int id)
        {
            ActionResult Result = null;
            var Repository = new ModelCL.Repository();
            var Model = Repository.GetProductByID(id);

            if (Model != null)
            {
                Result = View("Details", Model);
            }
            else
            {
                Result = Content("Producto no encontrado");
            }
            return Result;
        }
コード例 #2
0
 public ActionResult Index()
 {
     var Repository = new ModelCL.Repository();
     var Model = Repository.GetProducts();
     return View(Model);
 }