public ActionResult Create(Articulo model) { try { _articuloRepository = new ArticuloRepository(); _articuloRepository.GuardarArticulo(model); return RedirectToAction("Index"); } catch { return View(); } }
// GET: Articulo public ActionResult Index() { _articuloRepository = new ArticuloRepository(); var articulos = _articuloRepository.ObtenerArticulos(); return View(articulos); }