11,570 questions
LINQ: Datatable and List join return source contains no data row
T.Zacks
3,996
Reputation points
I am joining a datatable and List<string> but getting error that source contaisn no datarow. here is my code. please tell me what mistake i have made for which i am getting error. both list<string> and datatable has data.
var result = (from bkr in ds.Tables[2].AsEnumerable()
join prd in Listofperiods
on bkr.Field<string>("StandardDate") equals prd.ToString()
where string.IsNullOrEmpty(bkr.Field<string>("StandardValue"))
select bkr).CopyToDataTable();
Developer technologies | C#
Sign in to answer