0

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.

tvanfosson
  • 524,688
  • 99
  • 697
  • 795
Ozlem Balli
  • 67
  • 1
  • 7

1 Answers1

2

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

Community
  • 1
  • 1
Christian C. Salvadó
  • 807,428
  • 183
  • 922
  • 838