public IActionResult Create() { var model = new BookCreateEditViewModel() { Book = new Book(), AddPublisher = publisherData.GetPublisers().Select(x => new SelectListItem { Selected = false, Value = x.Id.ToString(), Text = x.Name }).ToList() }; return(View(model)); }
public IActionResult Index() { var model = new PublishersIndexViewModel(); model.Publishers = publisherData.GetPublisers(); return(View(model)); }