示例#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: Editoras
        public ActionResult Index()
        {
            var editoraViewModel = Mapper.Map <IEnumerable <Editora>, IEnumerable <EditoraViewModel> >(_editoraApp.GetAll());

            return(View(editoraViewModel));
        }