entity framework - how to pass linq query in datatable -


i want collect rows , pass datatable. linq query:

var queryall = in db.tblmake select ; datatable dt = new datatable(); 

how can pass queryall datatable dt?

if try :

 ienumerable<datarow> queryall = in db.tblmake.asenumerable() select all; 

comes error:

 cannot implicitely convert type 'system.collection.generic.ienumerable<workshop2s.models.tblmake>' 'system.collection.generic.ienumerable<system.data.datarow>' 


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -