C# + .NET MVC application using the Entity Framework Core for scaffolding and PostgreSQL as the backend database.
GitHub: BuildTrack
Before running the project, make sure you have .NET installed.
- Mac: Install via Homebrew:
brew install dotnet- Or use Visual Studio Community.
- The project was developed using VS Code, but any IDE supporting .NET works.
You also need the Entity Framework CLI:
dotnet tool install --global dotnet-ef- Open your terminal and create the database using
psql:
psql -U postgres -c "CREATE DATABASE buildtrackmvc";Replace
postgreswith your PostgreSQL username if different.
Bonus Command:
psql -U postgres -lto list current databases.
- Restore project dependencies:
dotnet restore- Create and apply EF Core migrations:
dotnet ef migrations add InitialCreate- Then apply migrations to the database:
dotnet ef database update- (Extra - Not necessary) Build the project:
dotnet buildThe connection string is set in appsettings.json:
"ConnectionStrings": {
"DefaultConnection": "Host=localhost;Port=5432;Database=buildtrackmvc;Username=postgres;Password=7603;Include Error Detail=true"
}Update
UsernameandPasswordaccording to your local PostgreSQL credentials.
Run the application using:
dotnet watch runThe app should now be accessible at https://localhost:5015 (or the port indicated in the console).