示例#1
0
        public HttpResponseMessage GetServiceCategories(CountryListRequest cr)
        {
            try
            {
                SqlParameter[] parameters = { new SqlParameter("@CountryId", cr.CountryId) };

                var CategoryDrop = _categoryManagementService.GetServiceCategory(StoredProceduresList.GetServiceCategory,
                                                                                 System.Data.CommandType.StoredProcedure, parameters);
                return
                    (Request.CreateResponse <ApiResponse <List <ServiceCategory> > >(HttpStatusCode.OK, CategoryDrop));
            }
            catch (Exception ex)
            {
                return
                    (Request.CreateResponse <System.Exception>(HttpStatusCode.InternalServerError, ex));
            }
        }