public async Task <IActionResult> SOCategoryEdit(int CategoryID) { if (CategoryID == 0) { return(RedirectToAction("SOCategories")); } var category = await _workorderService.GetClientCategory(CategoryID); var model = _mapper.Map <SOCategoryModel>(category); return(View(model)); }