I am developing a project that asks that items from a pizza restaurant be added to an order, not being a shopping cart, generating the order as if it were a cash program.
I do not know how to add items to this request in a web project, any tips?
Remembering that the order should receive N pizzas and N drinks and the solution is being developed in visual studio 2013
follow the code!
public class Pizza
{
public int PizzaID { get; set; }
public string Sabor { get; set; }
public double PrecoPizza { get; set; }
public string Tamanho { get; set; }
}
public class Bebida
{
public int BebidaID { get; set; }
public string TipoBebida { get; set; }
public string Sabor { get; set; }
public string Tamanho { get; set; }
public double PrecoBebida { get; set; }
}
public class Pedido
{
public int PedidoID { get; set; }
public double ValorTotal { get; set; }
public string Status { get; set; }
public int PedidoAtivo { get; set; }
public string DescricaoPedido { get; set; }
public virtual Pessoa Pessoa { get; set; }
public int PessoaID { get; set; }
public virtual ICollection<Bebida> Bebida { get; set; }
public int BebidaID { get; set; }
public virtual ICollection<Pizza> Pizza { get; set; }
public int PizzaID { get; set; }
public Pedido()
{
this.Pessoa = Pessoa;
this.Bebida = new List<Bebida>();
this.Pizza = new List<Pizza>();
}