public async Task <ActionResult <IEnumerable <Label> > > GetLabels() { //return await _context.Labels.ToListAsync(); // Original scaffold call using context directly return(await _repository.GetAllAlphabetical()); }
// GET: Labels public async Task <IActionResult> Index() { //return View(await _context.Labels.ToListAsync()); // Original scaffold call using context directly return(View(await _repository.GetAllAlphabetical())); }
// GET: Releases/Create public IActionResult Create() { ViewData["LabelId"] = new SelectList(_labelRepository.GetAllAlphabetical().Result, "LabelId", "Name"); ViewData["ArtistId"] = new SelectList(_artistRepository.GetAllAlphabetical().Result, "ArtistId", "Name"); return(View()); }