How to Fill Directly a DataTable using LINQ
-
Hi all, i created database.dbml file along with table1, table2. now i wanted to fill result set of table1 into a DataTable (ex: select * from table1 where table1Id=100) please help me
Ramana
-
Hi all, i created database.dbml file along with table1, table2. now i wanted to fill result set of table1 into a DataTable (ex: select * from table1 where table1Id=100) please help me
Ramana
var result = (from myData in databaseDataContext.table1 where myData.table1Id = 100 select myData) Then you can convert result into your datatable. Here's an example how you can convert it: http://www.c-sharpcorner.com/UploadFile/VIMAL.LAKHERA/LINQResultsetToDatatable06242008042629AM/LINQResultsetToDatatable.aspx[^]
-
Hi all, i created database.dbml file along with table1, table2. now i wanted to fill result set of table1 into a DataTable (ex: select * from table1 where table1Id=100) please help me
Ramana