DataTable workTable = new DataTable();
workTable.Columns.Add("ContryID", typeof(Int32));
workTable.Columns.Add("CountryName", typeof(string));
Data.TestEntities ent = new Data.TestEntities();
var country = ent.Countries.ToList();
foreach (var item in country)
{
DataRow workRow = workTable.NewRow();
workRow["ContryID"] = item.CountryID;
workRow["CountryName"] = item.CountryName;
workTable.Rows.Add(workRow);
}
now you can do anuthing with your workTable
happy coding :) :) :)