// GET: Articulo/Details/5 public ActionResult Details(int id) { SessionInitialize(); EventoCAD cad = new EventoCAD(session); EventoCEN cen = new EventoCEN(cad); EventoEN en = cen.ReadOID(id); AssemblerEvento ass = new AssemblerEvento(); Evento sol = ass.ConvertENToModelUI(en); IList <ComentarioEN> ten = en.Comentario; AssemblerComentario assc = new AssemblerComentario(); IList <Comentario> solc = assc.ConvertListENToModel(ten); SessionClose(); // ViewData["action"] = "Details"; ViewBag.coment = solc; System.Web.HttpContext.Current.Session["comen"] = id; return(View(sol)); }
// GET: Articulo public ActionResult Index() { System.Web.HttpContext.Current.Session["controller"] = "Comentario"; System.Web.HttpContext.Current.Session["action"] = "Index"; System.Web.HttpContext.Current.Session["arg"] = null; ComentarioCEN cen = new ComentarioCEN(); IList <ComentarioEN> enlinst = cen.ReadAll(0, int.MaxValue); AssemblerComentario ass = new AssemblerComentario(); IList <Comentario> listart = ass.ConvertListENToModel(enlinst); //articuloAsembler.covert return(View(listart)); }