示例#1
0
        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));
        }
示例#2
0
        public async Task <HttpResponseMessage> GetSubCategoryById(long subCategoryId)
        {
            ResponseModel response = await _subCategoryService.GetSubCategoryById(subCategoryId);

            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }