Challenge: Reverse Engineering
Explore how to reverse engineer a sample database by scaffolding models and configuring them using Entity Framework Core's fluent API. This lesson guides you through organizing your project files and adjusting the model structure to match the database schema, enhancing your understanding of EF Core workflows.
We'll cover the following...
We'll cover the following...
Overview
Let’s reverse engineer a sample school database in the project below.
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/net6.0/ScaffoldDB.dll",
"args": [],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}Reverse engineer a school database
Note the following within the project:
-
School.sql...