Hi, i'm having some trouble in making this on right. I'm trying to get the first image from each product inside a specific categorie, but so far i get all fotos, repeating the product list:
Dim Produtos = (From P In ProductsCtx.produto _
Join C In ProductsCtx.categoria On C.id Equals P.categoria_1.id _
Group Join F In ProductsCtx.FotosSet On F.produto.id Equals P.id Into Fotos = Group _
From Foto In Fotos.Take(1) _
Where C.id = Categorie _
Select New With {
.idProduto = P.id,
.Foto = Foto.idFoto,
.NomeProduto = P.nome,
.Preco = P.precoActual}).ToList