Final assignment for the OPF course — a Blazor-based quiz application.
- .NET 10 SDK
- Microsoft Visual Studio Community 2026 (recommended) or the
dotnetCLI - SQL Server or LocalDB (for the application's database)
- (Optional) EF Core CLI tools:
dotnet-ef(install withdotnet tool install --global dotnet-ef)
-
Clone the repository
-
Restore NuGet packages
-
Configure the database
- Update the connection string in the Blazor/server project's
appsettings.json(or use user secrets / environment variables) to point to your SQL Server / LocalDB instance.
- Apply Entity Framework migrations
-
This repository already includes EF Core migration files. In Visual Studio you can apply them directly from the Package Manager Console:
- Ensure the project that contains the
Migrationsfolder is selected as the Default project (PMC) and the correct startup project is selected as the solution Startup Project. - Run:
- Ensure the project that contains the
-
CLI alternative (PowerShell):
- Note for Blazor hosted solutions: run the migration command against the server/startup project (not the client) so the correct configuration and services are used.
5. Run the application
- In Visual Studio 2026: open the solution, set the Blazor/server project as the startup project, then press `F5`.
- From the terminal (project folder containing the `.csproj`):
The app typically runs at https://localhost:5001 (or the configured launch profile).
- "Cannot find dotnet-ef": install with
dotnet tool install --global dotnet-ef. Update-Databaseerrors: ensure the correct connection string, the PMC Default project points to the migrations project, and the solution Startup Project is the server/startup project. Use-Project/-StartupProjectflags when necessary.- Database permission errors: confirm SQL Server is running and the configured user has permission to create/update the database.
- This repository targets .NET 10 and contains a Blazor project — use the Blazor/server project folder for run and migration commands.
- Project requirement: do not use JWT authentication.
- If you want the README updated with the exact project
.csprojnames or a recommended launch profile, tell me which.csprojto target and I will update the instructions.
See repository metadata for license information.