This sample illustrates the implementation of ADO.NET Entity Framework support in the GridDataBoundGrid.
Below is an image of a GridDataBoundGrid Entity Framework.
GridDataBoundGrid Entity Framework.
Features
The ADO.NET Entity Framework enables you to create data access applications by programming against a conceptual application model instead of programming directly against a relational storage schema.
Interactive Features
The Entity Data Model Wizard is used to generate an Entity Data Model (EDM) for Entity Framework support. This allows you to create a model from an existing database in this sample..
The following code illustrates binding a datasource to the GridDataBoundGrid through the Entity Data Model.
//Creates an object for entity connection.
EntityConnection con = new EntityConnection("name=NorthwindGridEntities");
con.StoreConnection.ConnectionString = "Data Source=" + FindFile("NorthwindwithImage.sdf");
NorthwindGridEntities db = new NorthwindGridEntities(con);
//Bind the datasource to GridDataBoundGrid.
this.gridDataBoundGrid1.DataSource = db.Customers;
Note:
To run DBG Entity Framework_2008, you must have the following installed:
To run DBG Entity Framework_2010, you must have the following installed: