To provide a Products API to use for automation.
- Install Docker Desktop.
- Install Azure Storage Explorer.
- Open a command prompt and run the below command to download and run
Azurite
as a container in detached mode.
docker run -d -p 10000:10000 -p 10001:10001 -p 10002:10002 mcr.microsoft.com/azure-storage/azurite
- Open
Azure Storage Explorer
and create below. This table and queues are needed for the API to function.registrations
table.registrations
queue.update-registrations
queue.
- Validate request.
- Handling failures.
- Publishing domain event to Azure storage queue.
- Save data in Azure table storage.
- Validate request.
- Handling failures.
- Publishing domain event to Azure storage queue.
- Save data in Azure table storage.
- Validate request.
- Handling failures.
- Returns all the products.
- Integrating with Azure AD for authentication and authorization.
- Using Serilog for structured logging.
- Support for default and specific versioning.
- Using GHA for CI/CD pipelines.
- Using Azure Bicep for cloud resources deployment.
- Including comprehensive API documentation using Swagger.
- Creating an integration test suite.
public static async ValueTask<ChangeLocationRequest> BindAsync(
HttpContext context,
ParameterInfo _
)
{
var category = context.GetRouteValue(nameof(Category))?.ToString();
var productId = context.GetRouteValue(nameof(Id))?.ToString();
var record = await context.Request.Body.ToModel<ChangeLocationRequest>() with
{
Category = category ?? string.Empty,
Id = productId ?? string.Empty
};
return record;
}
}