예제 #1
0
        public IHttpActionResult GetAllCompanies()
        {
            CompanyModel companyModel = new CompanyModel();

            try
            {
                return(Content(HttpStatusCode.OK, companyModel.GetAll()));
            }
            catch (CDSException cdsEx)
            {
                return(Content(HttpStatusCode.BadRequest, CDSException.GetCDSErrorMessageByCode(cdsEx.ErrorId)));
            }
            catch (Exception ex)
            {
                return(Content(HttpStatusCode.InternalServerError, ex));
            }
        }