public HttpResponseMessage GetCities(int StateId) { try { SqlParameter[] parameters = { new SqlParameter("@StateId", StateId) }; var CategoryDrop = _categoryManagementService.GetCityMasters(StoredProceduresList.GetCitieList, System.Data.CommandType.StoredProcedure, parameters); return (Request.CreateResponse <ApiResponse <List <CityMaster> > >(HttpStatusCode.OK, CategoryDrop)); } catch (Exception ex) { return (Request.CreateResponse <System.Exception>(HttpStatusCode.InternalServerError, ex)); } }