سلام جناب فیروزی
من تمام مراحل شما رو اجرا کردم و این کد رو نوشتم:
PersepliosEntities de = new PersepliosEntities();
dataGridView1.DataSource = de.Players.Select(p => p);
اما زمان لود کردن اطلاعات داخل grid این پیغام رو میده:
An unhandled exception of type 'System.NotSupportedException' occurred in EntityFramework.dll
Additional information: 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().





پاسخ با نقل قول
