This is a simple example Web API built using a repository pattern and dependency injection.
- Open the solution in Visual Studio
- Modify the connection string in appsettings.json to reflect your database environment
- Run the following commands
dotnet ef update database InitialMigration
dotnet ef update database SeedPharmacyDbDatabase
- Build and run the PharamacyAPI project
Get /api/pharmacy
Get /api/pharmacy/{id}
Put /api/pharmacy/{id}
Request body:
{
"id": 0,
"name": "string",
"address": "string",
"city": "string",
"state": "st",
"zipcode": "920251666",
"filledPrescriptionsMonthToDate": 0,
"updatedAt": "2023-06-05T12:12:30.539Z"
}