Beispiel #1
0
        public HttpResponseMessage PostFornecedor(Fornecedor item)
        {
            item = repositorio.Add(item);
            var response = Request.CreateResponse <Fornecedor>(HttpStatusCode.Created, item);

            string uri = Url.Link("DefaultApi", new { id = item.Id });

            response.Headers.Location = new Uri(uri);
            return(response);
        }