Type inference failed in the call to 'SelectMany'

I have this LINQ query:

        var businessAffiliates = from b in context.Businesses
                                 from ba in b.BusinessOfficers
                                 from p in ba.Person                                     
                                 select b;

but I am getting this error:

An expression of type 'myproj.Models.Person' is not allowed in a subsequent from clause in a query expression with source type 'System.Linq.IQueryable'. Type inference failed in the call to «SelectMany».

18
задан Ladislav Mrnka 18 May 2011 в 19:58
поделиться