- Home
- .NET code examples
- Get started with Entity Framework Core
Get started with Entity Framework Core
Download the code example for our Get Started with EF Core course.
Include method to join two tables together.
Software
This is the software that will need to be installed onto your machine.
- Visual Studio 2022. Version 17.8.3 or above. It will work with the free community version.
- .NET 8 SDK. version 8.0.1 or above.
- SQL Server Management Studio.
Install LocalDB
Make sure that you have LocalDB installed on your machine. You can check in Visual Studio by going to Tools and Get Tools and Features....
Install LocalDB through the Visual Studio Installer
Get the application working
Download the code example
Fill out the code example form. We will send you an email where you can download the code example.
Importing the database
The database can be found in the Database folder as part of the code example.
(localdb)\MSSQLLocalDB and the Authentication as Windows Authentication.
Login to LocalDB in SQL Server Management Studio
Right-click on the Databases folder and go to Import Data-tier Application.
RoundTheCodeEFCore.bacpac which is included in the Database folder of the code example.
Import the database using SQL Server Management Studio
In the Database settings tab, ensure that the New database name is set as RoundTheCodeEFCore.
Set the database name when importing a bacpac database.
You should be able to continue through the next steps with the options untouched and it should successfully import the database.
Open the project in Visual Studio
Open up RoundTheCode.EFCore.sln in Visual Studio 2022.
https://localhost:7110/swagger/index.html.
More information
You are downloading the code example for the whole of the course.
Related code examples
Dynamic queries using LINQ expressions
Writing dynamic queries for Entity Framework. A sample .NET 5 MVC application, showing examples of LINQ expressions.