DataTable dt = new DataTable();
SqlDataAdapter da = new SqlDataAdapter(command);
da.Fill(dt);
var list = dt.AsEnumerable()
.Skip(1)
.Select(dr =>
new StudentListResponse
{
id = dr["PKStudentID"].ToString(),
name = dr["StudentName"].ToString(),
profile_pic = dr["PhotoURL"].ToString()
}
).ToList();
Here dt is the DataTable Holds data.
And StudentListResponse object list is created.






