// 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()); }
// GET: Editora public ActionResult Index() { var autorViewModell = Mapper.Map <List <Autor>, List <AutorViewModel> >(_autorAppService.GetAll()); return(View(autorViewModell)); }
// GET: Autor public ActionResult Index() { var autorViewModel = Mapper.Map <IEnumerable <Autor>, IEnumerable <AutorViewModel> >(_autorApp.GetAll()); return(View(autorViewModel)); }