Data binding directly to a store query (DbSet, DbQuery, DbSqlQuery, DbRawSqlQuery) is not supported. Load not there

asp.net, c#, entity-framework

Solution

I solved it by calling the ToList() method on it.

Problem

I am using EF and I have the following code in which I am trying to get rows from a view called interface5toSSHIP. The SQL Explorer reveals that the database view has one row right now. The following query doesn't seem to return it. What am I doing wrong? ``` IEnumerable<interface5toSSHIP> i5; using (RREM_GilbaneEntities3 entities3 = new RREM_GilbaneEntities3()) { i5 = from i in entities3.interface5toSSHIP select i; } ``` Then I get the title error when I attempt to DataBind it: ``` grdvwInterface5ReadyToSend.DataSource = i5; grdvwInterface5ReadyToSend.AllowPaging = true; grdvwInterface5ReadyToSend.AllowSorting = true; grdvwInterface5ReadyToSend.DataBind(); ``` The problem is I can't find how to do the Load. I looked up an example like this: ``` IntranetModelContainer db = new IntranetModelContainer(); db.Entities.OfType<Employee>().Load(); return db.Entities.Local.OfType<Employee>(); ``` I added a reference to System.Data.Entity and I can't find a .Entities off my entities3 or a LOad method. How do I do this?

Original source