Connection problem

I have this code:

int se = (int) settings.GruppoSegreteria;
    var acc = db.USR_Accounts.Where( p => p.ID_Gruppo == se);
    var segreterie = from s in db.USR_Utenti 
                     join h in acc on s.ID equals h.USR_UtentiReference
                     select s;

And this error:

The type of one of the expressions in the join clause is incorrect.  Type inference failed in the call to 'Join'

I do not understand. Can you help me?

thank

+3
source share
1 answer

You join s.IDand h.USR_UtentiReference. I think they are not the same type? You must join two ints (for example). You cannot join int and some other type.

+2
source

Source: https://habr.com/ru/post/1738004/


All Articles