public async Task <ActionResult> Update(int id) { var SubCategory = await _SubCategoryrepo.GetSubCategoryById(id); var model = new SubCategoryViewModel() { Categories = await _Categoryrepo.GetAllCategory(), SubCategory = SubCategory }; return(View("SubCategoryForm", model)); }
public async Task <HttpResponseMessage> GetSubCategoryById(long subCategoryId) { ResponseModel response = await _subCategoryService.GetSubCategoryById(subCategoryId); return(Request.CreateResponse(HttpStatusCode.OK, response)); }