예제 #1
0
 // GET: Livros/Create
 public ActionResult Create()
 {
     ViewBag.AutorId     = new SelectList(_autorApp.GetAll(), "AutorId", "Nome");
     ViewBag.CategoriaId = new SelectList(_categoriaApp.GetAll(), "CategoriaId", "Nome");
     ViewBag.EditoraId   = new SelectList(_editoraApp.GetAll(), "EditoraId", "Nome");
     return(View());
 }
예제 #2
0
        // GET: Editora
        public ActionResult Index()
        {
            var autorViewModell = Mapper.Map <List <Autor>, List <AutorViewModel> >(_autorAppService.GetAll());

            return(View(autorViewModell));
        }
예제 #3
0
        // GET: Autor
        public ActionResult Index()
        {
            var autorViewModel = Mapper.Map <IEnumerable <Autor>, IEnumerable <AutorViewModel> >(_autorApp.GetAll());

            return(View(autorViewModel));
        }