public async Task <IActionResult> EditOwner(string id) { User owner = await _userManager.FindByIdAsync(id); if (owner == null) { return(NotFound()); } EditOwnerViewModel viewModel = await _dbUsers.GetOwnerInfoAsync(owner); ViewBag.CatList = await _dbCategory.GetCatListAsync(); return(View(viewModel)); }
public async Task <IActionResult> Index() { ViewBag.Categories = await _dbCategory.GetCatListAsync(); return(View()); }