// GET: Livroes/Create public async Task <IActionResult> Create() { ViewData["AutorId"] = new SelectList(await _contextAutor.List(), "Id", "Pessoa.Nome"); ViewData["CategoriaId"] = new SelectList(await _contextCategoria.ListActive(), "Id", "Nome"); ViewData["LivroSituacaoId"] = new SelectList(await _contextLivroSituacao.List(), "Id", "Nome"); return(View()); }
// GET: LivroSituacaos public async Task <IActionResult> Index() { return(View(await _context.List())); }