Fast dotnet API project with entity framework core.
Aim for fast testing queries with mssql DB
✅ Clone the project to your machine
git clone https://github.com/Barsan1/QuickTestAPI.git
✅ Add your connection string in appsettings.json
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Mssql-TestDB": "<Enter connection string here>" // Connection string here
}
}
✅ Update database migration script with CLI
# Navigate to API project
cd .\API\
# Run migration
dotnet ef database update -v
This will open swagger with 2 endpoints :
- Get all pepole from db
- Add generated pepole to db