[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Expand]Controls and Libraries
 [Collapse]Common Features
  [Expand]Data Binding Common Concepts
  [Expand]Data Source Wizard
  [Expand]Application Appearance and Skin Colors
  [Expand]Filtering UI Context
  [Expand]High DPI Support
  [Collapse]Scaffolding Wizard
   [Expand]Data Access Layer
   [Collapse]Generating an Application
     How To: Generate an Application Based on the Existing Data Access Level
     Class Structure
     Embedded Functionality
  [Expand]Formatting Values
   HTML Text Formatting
  [Expand]Tooltip Management
  [Expand]Saving and Restoring Layouts
   Clipboard - Copy and Paste Operations. Data Formatting
   Version Compatibility: Default Property Values
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How To: Generate an Application Based on the Existing Data Access Level

This tutorial contains detailed steps that guide you through generating a ready-to-use application with the desired UI type. To successfully complete this tutorial, you first need to create a valid Data Access Layer acceptable by Scaffolding Wizard.

  1. Right-click a project in the Visual Studio's Solution Explorer window, then select the "Add | New Item" option (or press "CTRL+SHIFT+A").

  2. Search for the DevExpress Template Gallery item in the invoked dialog and click "Add".

  3. Scroll the Template Gallery down to the "SCAFFOLDING" heading and select the required application UI type. Do not choose the last option in this group, "Data Model Scaffolding", as it will not generate any predefined UI and you will have to create all required Views manually. This approach is described separately in the this MVVM tutorial.

  4. Choose the existing DbContext and an EF provider that will work with this context. It is recommended that you select the same EF provider as specified by your .edmx model.

  5. The following Wizard page lists all tables and views found in the selected model. You can clear the "View Model" and "View" check boxes to skip generating related classes for desired data tables/views. The "Read Only" check box column allows you choose whether or not the Wizard should generate a detail (edit) View for the data table. If this check box is cleared, end-users will not be able to add, remove or modify records in the table. Note that unlike tables, data views are always read-only. Check the required options and click "Finish" to start generating the app.

  6. After the Wizard finishes generating all Views and View Models, you will have lots of new files and folders added to your project. The Class Structure article will help you to get familiar with all these new items. For now, locate the "[Name_of_DbContext]View" UserControl in the VS Toolbox.

    This UserControl is your main start-up View. Drop it onto your main form and set its Dock property to Fill. For best visual results, apply an appropriate DevExpress skin and convert your default form to either XtraForm or RibbonForm. Then, launch the app to see the result. The following figure illustrates a running application with Tabbed UI.

    To learn about all runtime capabilities provided by your application, refer to the Embedded Functionality article.

Expanded See Also

Is this topic helpful?​​​​​​​