.net - LINQ Problem with Distinct count -


Trying to understand what is wrong, but I can not really do this if: < Previous> return dc.dictionaries.Select (d => New Administrator Overview Model {dictionary = D, WordQuality = DCN etherneten. Where (i => i.iddictionary == D.) .count ()});

This works fine, but if I change it in:

  back dc.dictionaries.Select (d => New Administrator Device View Model {dictionary = D, WordQuantity = Dc.interpretations.Where (i => i.iddictionary == d.iddictionary). Undoubtedly (new word insetistique). Calculation ()});   

And my class is:

  Public class WordsInDictionaryDistinct: IEqualityComparer   

I have:

  dictionary table iddictionary | Dictionary_name   
  word table id | Word_name   
  Anticipation of the interpretation table. Iddictionary | ID keyword   

and I only need to differently identify each of my queries, if I return to my first query, then about 10 words have a figure = 15, But this is a word, not 15:

interpretation table

  idinterpretation | Iddictionary | ID | Meaning 1 1 1115 Hello 2 1 1115 Hi 3 1 1115 Hi, BRO 4 1 1116 5 1 1118 Goodbye 6 1 1118 Bye 7 2 8 2 After my second query, I hope That I will get {d = 1, WordQuantity = 3}, but  

'unsupported overload' is used for query operator.

I have tried '

.toList & lt; Interpretation & gt; (). Specific (new word insetistique) Calculation ()

But still this is the error

In fact, do not know what to do: (

The problem is that IEqualityComparer can not be translated into SQL.

 Try changing the . (New word InsideDistink ()) Select   

with

 . (X => x. Idword). Undoubtedly ()    

Comments