Exemple #1
0
        public HttpResponseMessage GetStates(int CountryId)
        {
            try
            {
                SqlParameter[] parameters = { new SqlParameter("@CountryId", CountryId) };

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