The exception contains what you need to do:
...Instead populate a DbSet with data ...
So you need to evaluate the query. The exception mention the Load method but because you anyway need to store the result locally the easiest solution is to to call ToArray()
on your query when assign it to grdEmployees.DataSource
.
var query = ctx.Customers.Include("CustomerID").Take(3);
grdEmployees.DataSource = query.ToArray();
grdEmployees.DataBind();
The ToArray
method will execute the query the returns the result set in an array.