I am using datatable on which I want to use Linq. but as i am new to linq i dont know how it uses. I google it I got lots of information which is not sufficient like. If I am using datatable and i got info like :
DataRow r = from dr in ds.Tables["Customers"].AsEnumerable()
where dr.Field<Guid>("customerid").ToString() = row[2].ToString()
select dr;
dt.ImportRow(r);
and I have lots of queries like what is "dr". dr.fields?, ".AsEnumerable()" is not present at my side.
Even this code also doesnt work:
IEnumerable<DataRow> r = from dr in ds.Tables["Customers"].Select().Where(x => x.Field<Guid>("customerid").ToString() == row[2].ToString())
select dr;
So can anyone please give me link on which i got all information from beggining on linq.