Ozlem Balli
Ozlem Balli

Reputation: 67

Linq Query to Dataset

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.

Upvotes: 0

Views: 985

Answers (1)

Christian C. Salvad&#243;
Christian C. Salvad&#243;

Reputation: 828050

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

Upvotes: 2

Related Questions