I want to convert my Model data to DataSet
or DataTable
(to export in excel format)
db.EMPs.ToList()
db
is DataContext
, EMPs
is dataclass
.
How to export this list to DataTable
, I can export rows to excel but how to access column name from header (column name should not be added manually in DataTable
)
LINQ to Entities does not recognize the method 'System.String Format(System.String, System.Object, System.Object)' method, and this method cannot be translated into a store expression. – Saurabh Mar 02 '17 at 09:22