Beispiel #1
0
        // GET: Books/Create
        public IActionResult Create()
        {
            ViewData["AuthorId"] = new SelectList(_context.Author, "AuthorId", "AuthorId");
            List <AuthorDropDown> authors = new List <AuthorDropDown>();

            authors            = viewModel.GetAuthors(_context);
            ViewBag.ListOfBook = authors;
            return(View());
        }
Beispiel #2
0
 private void ComboBox_DropDownOpened(object sender, EventArgs e)
 {
     VM.GetAuthors();
 }