diamond diamond

diamond diamond

  • NA
  • 133
  • 55.3k

Please help to solve this query by linq

Sep 6 2013 11:25 AM
Hi,

I have 2 table kv2 and kv2dns, which kv2 has a data table is named dt but kv2dns has not.

dt has some fields such as src, dst, time, dport
kv2dns has some fields such as source, destination, info

src and destination values are the same.
dst and source values are the same.
but no tables have primary key.
When I wrote such as below, gives an error

Error:A query body must end with a select clause or a group clause


var q = from k in dcdns.kv2dns where
                            from DataRow dr in dt.Rows  where (dr["saddr"] == dcdns.kv2dns.Select (s=>s._Destination_)  &&  dr["daddr"] == dcdns.kv2dns.Select (s =>s._Source_ ) &&  dcdns.kv2dns.Select (s=>s._Info_ .Contains("no such name")) )  
                            select new { k._Destination_ } ;


                 

Answers (1)