https://github.com/mariusz96/azure-blogs
A web API in C# and Azure
https://github.com/mariusz96/azure-blogs
azure azure-app-service azure-key-vault azure-sql-database csharp
Last synced: 3 months ago
JSON representation
A web API in C# and Azure
- Host: GitHub
- URL: https://github.com/mariusz96/azure-blogs
- Owner: mariusz96
- Created: 2024-12-17T20:01:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-11-17T22:04:12.000Z (8 months ago)
- Last Synced: 2025-11-18T00:07:37.059Z (8 months ago)
- Topics: azure, azure-app-service, azure-key-vault, azure-sql-database, csharp
- Language: C#
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Azure Blogs
A web API in C# and Azure:
```JavaScript
POST /api/blogs
{
"url": "https://devblogs.microsoft.com/dotnet/category/azure/"
}
```
```JavaScript
201 Created
1
```
```JavaScript
POST /api/posts
{
"title": "Hello World",
"content": "I wrote an app using Azure!",
"blogId": 1
}
```
```JavaScript
201 Created
1
```
```JavaScript
DELETE /api/blogs/1
```
```JavaScript
204 No Content
```
## Prerequisites:
- .NET 9.0
- Visual Studio 2022
- Azure development workload
## Test:
- `Test Explorer` > `Run All Tests`
## Deploy:
- Create a new SQL Database and migrate it
- Create a new Key Vault, add a secret with `ConnectionStrings--AzureBlogsContext` name and SQL Database connection string value, and configure `KeyVaultName` property in `appsettings.json` file
- Publish `AzureBlogs.Api` web app to App Service
- Add permisions to web app to access other created resources
- Delete all created resources to prevent ongoing charges
## Azure services used:
- App Service
- SQL Database
- Key Vault