I have 2 entities:
Product Order and Product ...
Using the fluent API as I say to my entity Requested Item that it has a Product?
Note: The product entity can not have dependencies, although 1 product can be in several items. I do not want it to depend on an item. Request to exist ...
Product Class:
namespace DTO
{
public class ProdutoDTO
{
public int produtoID { get; set; }
public int codigo { get; set; }
public string descricao { get; set; }
public decimal preco { get; set; }
}
}
Order Item Class:
namespace DTO
{
public class ItemPedidoDTO
{
public int itemPedidoID { get; set; }
public int quantidade { get; set; }
public int porcentagemDesconto { get; set; }
public int produdoID { get; set; }
public virtual ProdutoDTO produto { get; set; }
}
}