コード例 #1
0
ファイル: AutorController.cs プロジェクト: xals1997/DAW
        // GET: Usuario
        public ActionResult Index()
        {
            AutorCEN        cen    = new AutorCEN();
            IList <AutorEN> listen = cen.ReadAll(0, -1).ToList();
            AssemblerAutor  ass    = new AssemblerAutor();
            IList <Autor>   list   = ass.ConvertListENToModel(listen);

            return(View(list));
        }
コード例 #2
0
        // GET: Autor
        public ActionResult Index()
        {
            SessionInitialize();                    //no se navega por en EN pero se hace por si se mueve por ens
            AutorCAD auCAD = new AutorCAD(session); //el session se crea dentro del initialize por herencia del basic
            AutorCEN auCEN = new AutorCEN(auCAD);

            IList <AutorEN> auEN = auCEN.ReadAll(0, -1);
            IEnumerable <AutorViewModel> autviewmodel = new AutorAssembler().ConvertListENToModel(auEN).ToList();

            SessionClose();

            return(View(autviewmodel));
        }