Beispiel #1
0
        // GET: Products
        public ActionResult Index()
        {
            decimal elPrecioInferior = 20;
            decimal elPrecioSuperior = (decimal)55.6;
            var     laAccion         = new AW.Wcf.Acciones.Productos();
            var     products         = laAccion.BuscarProductoPorRangoDePrecio(elPrecioInferior, elPrecioSuperior);

            //var products = db.Products.Include(p => p.ProductModel).Include(p => p.ProductSubcategory);
            return(View(products.ToList()));
        }
Beispiel #2
0
        public ActionResult IndexViewModel()
        {
            decimal elPrecioInferior  = 20;
            decimal elPrecioSuperior  = (decimal)55.6;
            var     laAccion          = new AW.Wcf.Acciones.Productos();
            var     products          = laAccion.BuscarProductoPorRangoDePrecio(elPrecioInferior, elPrecioSuperior);
            var     laAccionViewModel = new Dominio.Acciones.ConvertirProductEnViewModel();
            var     productsViewModel = laAccionViewModel.ConviertaListaDeProductos(products);

            //var products = db.Products.Include(p => p.ProductModel).Include(p => p.ProductSubcategory);
            return(View(productsViewModel.ToList()));
        }