title: DbExpressionBinding requires an input expression with a collection ResultType. Parameter name: input
body: <p>I've a big problem with my linq query</p>
  
  <pre><code>            var t = from tl in _GxEntities.T_L
                               join td in _GxEntities.T_D on (int)tl.fld_rdRequestfk equals td.fld_rqID_pk
                               join tpd in _GxEntities.T_P_D on (int)td.fld_rqID_pk equals tpd.fld_pdRequest_fk                                 
                               where tpd.fld_pdda == null
                                  &amp;&amp; tpd.fld_pdSU_fk == tl.fld_rdSU_fk
                                  &amp;&amp; td.fld_rqstatus != 1
                                  &amp;&amp; tl.fld_rcid != null
                                  &amp;&amp; tl.loc_id == UsrProfilService.loc_id
                                  &amp;&amp; tl.fld_rcid.Any(x=&gt; tblRvGxFr.Select(c=&gt;c.Nte).Contains(x.ToString()))
                               group tl by new
                               {
                                   tl.fld_rcid,
                                   tl.fld_rdSU_fk,
                                   tl.fld_rdtRequested_Q,
                                   tl.loc_id
                               } into q
                               select new RVSyntheseDetailModel()
                               {
                                   RC_ID = q.Key.fld_rcid,
                                   SU = (int)q.Key.fld_rdSU_fk,
                                   Ts = (int)q.Sum(k =&gt; k.fld_rdtRequested_Q),
                                   LOC_ID = (short)q.Key.loc_id
                               };
  
          return t.ToList();
  </code></pre>
  
  <p>If I comment <code>&amp;&amp; tl.fld_rcid.Any(x=&gt; tblRvGxFr.Select(c=&gt;c.Nte).Contains(x.ToString()))</code> this part I don't have any problem. <code>tblRvGxFr</code> is from another entities and looks like this :</p>
  
  <pre><code>var dateLimit = DateTime.Now.Date.AddMonths(-1);
  
  var tblRtvGrxFr = from tgx in _FtEntities.TL_RV_FR_GX
   where tgx.RV_D_LIM_RET &gt; dateLimit &amp;&amp; tgx.RV_N_IDT_DAP != null &amp;&amp; tgx.RV_LOC_ID == SqlFunctions.StringConvert((double)UsrProfilService.loc_id)
    select new RVSyntheseRrModel()
    {
        Nte = tgx.RV_ETET,
        Tr = tgx.RV_TR,
        Filiere = tgx.RV_T_PRD,
        Lib_art = tgx.RV_L_ART,
        SU = tgx.RV_N_IDT_DAP,
        Qte_demand = (int?)tgx.RT_Q_DEM_RET ?? 0,
        Ord = 0,
        Tcs = 0,
        AfA = 0,
        PrA = 0,
        Exped = 0,
        Loc_Id = tgx.RV_LOC_ID,
        Reason = tgx.RV_REASON
    };
  </code></pre>
  
  <p>Can you help me? Why do I get this error "DbExpressionBinding requires an input expression with a collection ResultType. Parameter name: input"?</p>
  
  <p>And if I change this condition to : &amp;&amp; tblRvGxFr.Select(i => i.Nte).Contains(tl.fld_rcid) I've this error : Unable to process the type 'GX.ViewModels.RVSyntheseRrModel[]', because it has no known mapping to the value layer.</p>