Adiciona() публичный Метод

public Adiciona ( Carrinho carrinho ) : void
carrinho Loja.Models.Carrinho
Результат void
Пример #1
0
        public HttpResponseMessage Post([FromBody]Carrinho carrinho)
        {
            var dao = new CarrinhoDAO();
            dao.Adiciona(carrinho);

            var response = Request.CreateResponse(HttpStatusCode.Created);
            var location = Url.Link("DefaultApi", new { controller="carrinho",id=carrinho.Id });
            response.Headers.Location = new Uri(location);

            return response;
        }