public ActionResult <FieldsCategoryListViewModel> GetAllFieldsCategory(FieldsCategoryListViewModel fieldsCategoryListViewModel) { FieldsCategoryListViewModel fieldsCategoryList = new FieldsCategoryListViewModel(); try { if (fieldsCategoryListViewModel.SchoolId > 0) { fieldsCategoryList = _customFieldService.GetAllFieldsCategory(fieldsCategoryListViewModel); } else { fieldsCategoryList._token = fieldsCategoryListViewModel._token; fieldsCategoryList._tenantName = fieldsCategoryListViewModel._tenantName; fieldsCategoryList._failure = true; fieldsCategoryList._message = "Please enter valid school id"; } } catch (Exception es) { fieldsCategoryList._message = es.Message; fieldsCategoryList._failure = true; } return(fieldsCategoryList); }