charan sri

charan sri

  • NA
  • 10
  • 22k

linq query for joining of two queries with multiple fields

Oct 20 2012 12:33 AM
var docQuery = ProfilesContext.My_usr_profiles.Where(i=>i.Usr_profiles_id>=1).Select(i=>new{i.Usr_profiles_id,i.Usr_profiles_usr_id,i.Usr_profile_name}).ToList();
 
var query = dbContext.usr_mails.join(docQuery,m=>new{id1=m.mail_id,id2=m.mail_usr_id},n=>new{id1=n.Usr_profiles_id,id2=n.Usr_profiles_usr_id},(m,n)=>new{m.mail_id,m.mailer_name,n.profile_usr_name}).ToArray();
 
when I am joining like this it is showing error at the "join".can u tell me how to join in this case

Answers (1)