Here i am trying to bind the user list uow.Repository<User>().GetAll().ToList(); to DataTable dt but there is a error saying cannot convert type 'system.collections.generic.list ' to 'system.data.datatable' in line dt = uow.Repository<User>().GetAll().ToList();.
Below is my code
public DataTable GetAllUser1()
{
DataTable dt = new DataTable();
dt = uow.Repository<User>().GetAll().ToList();
return dt;
}
Any Help will be highy appreciated.Thank you