public ActionResult CreateCarrinho(Modelo.Carrinho.Carrinho carrinho, FormCollection collection) { carrinho.ClienteId = Convert.ToInt32(collection.Get("idcliente")); carrinho.Cliente = clienteServico.ObterClientePorId((long)carrinho.ClienteId); carrinhoServico.CreateCarrinho(carrinho); HttpContext.Session["carrinho"] = carrinho; return(View("CarrinhoAddProdutos", carrinho)); // return Content("Ok"); // return PartialView("_CreateCarrinho", carrinho); }
public Modelo.Carrinho.Carrinho CreateCarrinho(Modelo.Carrinho.Carrinho carrinho) { return(carrinhoDAL.CreateCarrinho(carrinho)); }
public Modelo.Carrinho.Carrinho CreateCarrinho(Modelo.Carrinho.Carrinho carrinho) { context.Carrinhos.Add(carrinho); context.SaveChanges(); return(carrinho); }