// GET: Files/Upload public IActionResult Upload() { var owners = _ownersManagementLogic.GetOwnersAsync().GetAwaiter().GetResult(); var selectItems = new List <SelectListItem>(); foreach (var owner in owners) { selectItems.Add(new SelectListItem($"{owner.FirstName} {owner.LastName}", owner.Id.ToString())); } ViewBag.Owners = selectItems; return(View()); }
// GET: Owners public async Task <IActionResult> Index() { return(View(await _ownersManagementLogic.GetOwnersAsync())); }