linq join query

Posted by SamB09 on Stack Overflow See other posts from Stack Overflow or by SamB09
Published on 2010-04-02T00:27:42Z Indexed on 2010/04/02 0:33 UTC
Read the original article Hit count: 298

Filed under:

Hi, im trying to do a join in linq , however for some reason i cant access the primary key of a table. It's the 'h.ProjectId' that doesn't seem to be accepted. The following error is given CW1.SearchWebService.Bid does not contain a definition for 'ProjectId' and no extention method 'ProjectId' accepting a first argument of type 'CW1SearchWebService.Bid'

var allProjects = ctxt.Project.ToList() ;
     var allBids = ctxt.Bid.ToArray();// return all bids

            var projects = (from project in allProjects
                            join h in allBids
                              on
                           project.ProjectId equals  h.ProjectId

© Stack Overflow or respective owner

Related posts about linq-to-sql