c# - How to modify this Select Statement inorder to get the data using LINQ? -
i have 2 data tables lsstitable
, lsstitable1
. want fetch data row1
, row2
satisfying conditions.i think error because row1
, row2
after satisfying condition row1
returns 3 things ldsid
,looppairid
, loccode
. loccode
returns null value. hence error. how overcome that?
var rowdata = (from row1 in lsstitable.asenumerable() join row2 in lsstitable1.asenumerable() on new { = row1.field<int>("ldsid"), b = row1.field<byte>("looppairid") } equals new { = row2.field<int>("ldsid"), b = row2.field<byte>("looppairid") } select new { row1, row2 }).tolist();
this error get
'system.data.datarow' not contain definition 'loccode' , no extension method 'loccode' accepting first argument of type 'system.data.datarow' found (are missing using directive or assembly reference?)
recheck whether ldsid , looppairid int , byte in database tables..it other type.
Comments
Post a Comment