DBChoose is a .NET Core 7 project that allows you to switch between different database engines using an environment variable. It leverages Entity Framework Core for seamless database interaction.
- Supports both SQL Server and PostgreSQL as backend database engines.
- Utilizes Docker and Docker Compose for easy setup and deployment.
- Flexibly switch between database engines using environment variables.
- Clone the repository to your local machine.
git clone https://github.com/abelmaro/DBChoose.git
- Navigate to the project directory.
cd DBChoose
- Update the DATABASE_PROVIDER environment variable inside docker-compose.yml. You can choose between "sql" or "postgresql"
...
environment:
DATABASE_PROVIDER: "sql"
...
- Start the project using Docker Compose.
docker compose up
This will spin up instances of SQL Server, the project API, and PostgreSQL.
Happy coding!