Exemple #1
0
        public HttpResponseMessage Post(ShoppingCartDeveloper developer)
        {
            try
            {
                ShoppingCartRepository.AddDeveloperToShoppingCart(developer);
            }
            catch (Exception ex)
            {
                return(Request.CreateResponse(System.Net.HttpStatusCode.InternalServerError, ex.Message));
            }

            return(Request.CreateResponse <ShoppingCartDeveloper>(System.Net.HttpStatusCode.Created, developer));
        }