Data Binding Error ch14 p491
Hello,
I keep getting this error even after going back and redoing it:
" Data binding directly to a store query (DbSet, DbQuery, DbSqlQuery, DbRawSqlQuery) is not supported. Instead populate a DbSet with data, for example by calling Load on the DbSet, and then bind to local data. For WPF bind to DbSet.Local. For WinForms bind to DbSet.Local.ToBindingList().
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NotSupportedException: Data binding directly to a store query (DbSet, DbQuery, DbSqlQuery, DbRawSqlQuery) is not supported. Instead populate a DbSet with data, for example by calling Load on the DbSet, and then bind to local data. For WPF bind to DbSet.Local. For WinForms bind to DbSet.Local.ToBindingList().
Source Error:
Line 17: select review;
Line 18: GridView1.DataSource = authorizedReviews;
Line 19: GridView1.DataBind();
Line 20: }
Line 21: }
Source File: c:\TestBegASPNET\WebSite1\Reviews\All.aspx.cs Line: 19 "
any Ideas?
|