In this example, the blank sample project (.NET 6) is connected to the Northwind database. You can find this database at the following path: /CS(VB)/WPFBlankDotNETAppWithNorthwindDatabase/Data/Northwind.mdf.
Database structure:
You can use this example to create DevExpress projects and explore our features.
This project includes the DevExpress ThemedWindow as a root element. Refer to the following topic for more information about custom-designed themes: WPF Application Themes.
The steps below demonstrate how to create this sample application:
-
Select the target framework, language, and Blank MVVM Application template and click Create Project:
-
Add the
Microsoft.EntityFrameworkCore.SqlServer
andMicrosoft.EntityFrameworkCore.Tools
NuGet packages to the project: -
Open the Package Manager Console and run the following command. This command generates code for a DbContext and entity types for a database. The
C:\Data\Northwind.mdf
string is the path to your local database:Scaffold-DbContext "Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Data\Northwind.mdf;Integrated Security=True" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Context NorthwindEntities -Tables "Categories","Customers","CustomerDemographics","Employees","Orders","Order Details","Products","Region","Shippers","Suppliers","Territories"
- Scaffold-DbContext
- .NET documentation
- DevExpress WPF Controls
- Getting Started with the DevExpress Data Grid
(you will be redirected to DevExpress.com to submit your response)