3
Imagine I have the following classes:
public class Pedido
{
    public int PedidoId { get; set; }
    public List<ItemPedido> Itens { get; set; }
}
public class ItemPedido
{
    public int ItemPedidoId { get; set; }
}
And I need to return all orders with your Chiropractor together with its items with the respective Itempedidoid, this in a single Collection, something like:
var pedido1 = new Pedido() { PedidoId = 1 };
pedido1.Itens.Add(new ItemPedido() { ItemPedidoId = 1 });
pedido1.Itens.Add(new ItemPedido() { ItemPedidoId = 2 });
var pedido2 = new Pedido() { PedidoId = 2 };
pedido2.Itens.Add(new ItemPedido() { ItemPedidoId = 1 });
pedido2.Itens.Add(new ItemPedido() { ItemPedidoId = 2 });
var pedidos = new List<Pedido>();
pedidos.Add(pedido1);
pedidos.Add(pedido2);
// Como fazer aqui? ...
var pedidoItens = from p in pedidos 
                  //select new { p.PedidoId, ? }                        
/* ...Para retornar isso
    * PedidoID, ItemDoPedidoID              
        1     ,   1
        1     ,   2
        2     ,   1
        2     ,   2
*/
What is the best way to achieve this result using Linq?
That? https://answall.com/q/80066/101
– Maniero