private void LoadCreateViewBags() { var languages = _inventoryService.AllLanguages(); ViewBag.LanguageId = new SelectList(languages, "Id", "Name"); var publisher = _inventoryService.AllPublisher(); ViewBag.PublisherId = new SelectList(publisher, "Id", "Name"); var authors = _inventoryService.AllAuthors(); ViewBag.Authors = new SelectList(authors, "Id", "FullName"); var categories = _inventoryService.AllCategories(); ViewBag.Categories = new SelectList(categories, "Id", "Name"); }
// GET: /<controller>/ public IActionResult Index() { var authors = _inventoryService.AllAuthors(); return(View(authors)); }