Beispiel #1
0
        public Rating Add(Rating rating)
        {
            try
            {
                var br = new RatingBusiness();
                return(br.Add(rating));
            }
            catch (Exception ex)
            {
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422,
                    ReasonPhrase = ex.Message
                };

                throw new HttpResponseException(httpError);
            }
        }