This repository serves as a template for implementing the Generic Repository Pattern in a .NET Core Web API (version 6.0). The template includes a generic entity repository and controller patterns, and it uses PostgreSQL as the database provider. Additionally, a Docker container is set up to run the PostgreSQL database alongside the application.
-
Clone the repository:
docker build -t genericrepopatterndemo . -
Build and run the Docker container:
docker-compose up -d
The PostgreSQL database connection details can be configured in the appsettings.json file.
{
"ConnectionStrings": {
"DefaultConnection": "Host=localhost;Port=5432;Database=YourDatabaseName;Username=YourUsername;Password=YourPassword;"
},
// Other configurations...
}