Skip to content

DevExpress-Examples/wpf-blank-dot-net-app-with-the-northwind-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WPF Blank .NET 6 App with the Northwind Database

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:

image

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.

Implementation Details

The steps below demonstrate how to create this sample application:

  1. Create a new project: image

  2. Select the DevExpress v22.2 WPF App Template Gallery: image

  3. Specify the Project name and click Create: image

  4. Select the target framework, language, and Blank MVVM Application template and click Create Project: image

  5. Add the Microsoft.EntityFrameworkCore.SqlServer and Microsoft.EntityFrameworkCore.Tools NuGet packages to the project: image

  6. 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"

Documentation

More Examples