tags:

views:

197

answers:

1

Hi,

I got a linq query. I wanna take this query results to a dataset. How can I do this ?

var variable = from t in db.Islems
               where t.Tarih >= dateTimePicker1.Value
                     && t.Tarih < dateTimePicker2.Value
               select t;

DataSet ds = new DataSet();

I wanna load the query results to the dataset, then use it in Crystal Reports.

+1  A: 

Check the extension method that I posted here, it uses reflection and generics to convert any IEnumerable<T> collection to a DataTable.

CMS