Linq to Entities のクエリが必要で、結果は "," で区切られたユニック文字列です。私は試してみますCont = String.Join(", ", op.OperacionesContenedores.Select(Function(jj) jj.Id.ToString).ToArray())
例:
(From op In dContext.Operaciones
Join opTr In dContext.OperacionesTransito On opTr.idOperacion Equals op.id
Group Join opTrContenedor In dContext.OperacionesContenedores On opTr.idOperacion Equals opTrContenedor.IdOperacion Into grpOpTrContenedor = Group
From opTrContenedor In grpOpTrContenedor.DefaultIfEmpty()
Select New With {.idOperacion = op.id,
.Expediente = op.ReferenciaEmpresaResponsable,
.ReferenciaCliente = op.ReferenciaEmpresaCliente,
.Cont = String.Join(", ", op.OperacionesContenedores.Select(Function(jj) jj.Id.ToString).ToArray())
}).Distinct().AsQueryable
これは「Expediente」、「referenciaCliente」、「con1、cont2、cont3」を返すはずですが、クエリの実行でエラーが発生します。
LINQ to Entities does not recognize the method 'System.String Join(System.String, System.String[])' method, and this method cannot be translated into a store expression
.