Logo

Initial Database Setup

This guide walks through setting up the database for the first time.

Prerequisites

Step 1: Verify Connection String

Ensure your connection string is properly configured. See Connection String Setup.

Step 2: Apply Migrations

Run the following command in your project directory:

dotnet ef database update

This will create the database and apply all pending migrations.

Step 3: Verify Database

After migrations complete, you should see these tables:

Troubleshooting

Cannot connect to database
Verify SQL Server is running and check your connection string.
Access denied
The account may not have permission to create databases. Create the database manually or use an account with db_creator role.