Esempio n. 1
0
        //
        // GET: /StoreManager/Create
        public IActionResult Create()
        {
            var genreTask  = _catalogService.GetAllGenres();
            var artistTask = _catalogService.GetAllArtists();

            Task.WaitAll(genreTask, artistTask);

            ViewBag.GenreId  = new SelectList(genreTask.Result, "GenreId", "Name");
            ViewBag.ArtistId = new SelectList(artistTask.Result, "ArtistId", "Name");

            return(View());
        }