Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Index()
        {
            ViewBag.Categories = await _dbCategory.GetCatListAsync();

            return(View());
        }