How to create a database connection in WPF?
If you've added an existing database as a draft to the WPF project, the easiest way to create a data connection is to double-click the database under Visual Studio
This opens the Server Explorer and integrates the SQL Server database as Datat Connections
This process is important if you then want to build an Entity Framework connection.
When going under WPF Project-> Add-> New Item
Then in the dialog Add New Item-> Data-> ADO.Net Entity Data Model
Integrate a new EF database structure
And Entity Data Model Wizard-> Choose Model Contents-> EF Designer from Database
Is the generated data connection proposed to the local database
Under Save connection settings in App.Config
Is it possible to specify the database context like: dbTables_and_Views.
Then finally select the tables
Tip: Save model namespace as dbModel
Done: integrated into the WPF project