Back to Devexpress

Entity Framework Data

windowsforms-115502-controls-and-libraries-pivot-grid-binding-to-data-data-source-configuration-wizard-entity-framework-data.md

latest1.6 KB
Original Source

Entity Framework Data

  • Sep 03, 2021
  • 3 minutes to read

The Data Source Configuration Wizard allows you to bind the PivotGridControl to a SQL database using Entity Framework at design time. Follow the steps below to accomplish this task.

  1. Open the form with the PivotGridControl in Visual Studio Designer. Click the Data Source Wizard button located on the PivotGridControl design surface or use the related command in the control’s smart tag.

  2. In the invoked Data Source Configuration Wizard, select Entity Framework

  3. The following message appears:

  4. Make sure that the ADO.NET Entity Data Model item is selected in the invoked dialog. Then, specify the name (in this example, NorthWindModel) and click Add.

  5. The following image gallery shows the Entity Data Model Wizard in three steps required to create the Data Model.

  6. The created model looks as follows:

Important

After you create a data model, rebuild the solution.

  1. After creating a data model, click the Data Source Wizard button again.

  2. In the invoked Data Source Configuration Wizard, select the created data source.

  3. On the next page, select the binding method.

  4. On the final page, specify the data source table..

  5. The Data Source Configuration Wizard generates the following code:

See Also

Server Mode with Entity Framework

Entity Framework Documentation