This project uses .NET Core SDK version 2.2.301 with Entity Framework Core to create a simple console application. This console application serves only one purpose -- to demostrate knowledge of Entity Framework Core with basic .NET Core SDK functionality.
The significance in this app is the way in which it was built. Following Microsoft documentation, I used the .NET Core SDK to do the following steps:
- Create a new project
dotnet new console -o ConsoleApp.SQLite
- Install Entity Framework Core
dotnet add package Microsoft.EntityFrameworkCore.Sqlite
dotnet add package Microsoft.EntityFrameworkCore.Design
-
Run
dotnet restore
to install new packages. -
Create the Product and Store models.
-
Using migrations, I created the SQLite database with the following .NET Core SDK commands:
dotnet ef migrations add InitialCreate
dotnet ef database update
- Then, when the app is run in the VS Code terminal, you can see the results of adding model records to the database.
ConsoleApp.SQLite>dotnet run
1 records saved to the database
All stores in the database:
...
- Also, updated the Store model and ran additional migrations in order to try that.