コード例 #1
0
ファイル: CountryService.cs プロジェクト: MatiasRosas/MCGA
        public AllResponseCountry All()
        {
            try
            {
                var response = new AllResponseCountry();
                var bc       = new CountryBusiness();
                response.Result = bc.All();
                return(response);
            }
            catch (Exception ex)
            {
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422,
                    ReasonPhrase = ex.Message
                };

                throw new HttpResponseException(httpError);
            }
        }