I'm using Entityframework(Vs2010) to connect MySql.
From model I created a storedprocedure , and created functionImport to call this
storedprocedure and a complextype.
Here is mycode :
sampleEntities1 db = new sampleEntities1();
List<EmpList> data = db.SelectEmployee().ToList<EmpList>();
GridView1.DataSource = data;
GridView1.DataBind();
But gives me error saying:
The data source for GridView with id 'GridView1' did not have any properties or attributes from which to generate columns. Ensure that your data source has content.
How to solve this????
From model I created a storedprocedure , and created functionImport to call this
storedprocedure and a complextype.
Here is mycode :
sampleEntities1 db = new sampleEntities1();
List<EmpList> data = db.SelectEmployee().ToList<EmpList>();
GridView1.DataSource = data;
GridView1.DataBind();
But gives me error saying:
The data source for GridView with id 'GridView1' did not have any properties or attributes from which to generate columns. Ensure that your data source has content.
How to solve this????