Unable to translate lambda expression 'entDocEntity => ((entDocEntity.Interfaces != null) AndAlso entDocEntity.Interfaces.Any(entMlInterfaces => ((entMlInterfaces.Linked != null) AndAlso value(System.Collections.Generic.List`1[System.Guid]).Contains(entMlInterfaces.Linked.Id))))' because it requires to materialize entity of type 'Werp.Model.Models.Documents.DocEntity'. The code:
ent.Interfaces - is EntitySet<ent2> If I remove ent.Interfaces != null and ent2.Linked != null - then it translates normally. But this Expression is generated, and we need those "!= null" operands, because we use these expression in runtime not only for SQL queries Updated at 16.07.2010 13:42:33Well, I suppose you sould do it as you wish) As for me i would just not translate this into sql This thread was imported from our support forum. The original discussion may contain more detailed answer. |
Issue: http://code.google.com/p/dataobjectsdot ... ail?id=751 I set priority to medium - as far as I can judge, you can workaround this by processing the expression (is this really possible?). |
I.e. we should enable translation of someEntity.EntitySet == / != null expression as always false / true?