Example #1
0
        public async Task <IActionResult> Details(int id)
        {
            if (id <= 0)
            {
                return(RedirectToAction(nameof(Index)));
            }
            var catdetail = await _categoryViewModelService.GetCategoryAsync(id);

            if (catdetail == null)
            {
                return(RedirectToAction(nameof(Index)));
            }
            return(View(catdetail));
        }