i am using the below code
IEnumerable<DataRow> query = from c in at.appointmentcalendars.AsEnumerable()
select c;
DataTable dt = query.CopyToDataTable();
But i am getting the below error
Cannot implicitly convert type
'System.Collections.Generic.IEnumerable<appointmentcalendar>'
to'System.Collections.Generic.IEnumerable<System.Data.DataRow>'
. An explicit conversion exists (are you missing a cast?)