This project demonstrates how to implement a resilient API using the Polly library. Below is an overview of the project structure.

- Clone the repository.
- Open the solution in Visual Studio or Rider
- Run the
ResilientApiproject. - Run the
ResilientApiGatewayproject. - Navigate to the Swagger UI for the
ResilientApiGatewayproject athttp://localhost:5224/swagger/index.htmlorhttps://localhost:7217/swagger/index.html
- Navigate to the Swagger UI for the
ResilientApiproject athttp://localhost:5282/swagger/index.htmlorhttps://localhost:7266/swagger/index.html
- Use the
ResilientApiGatewaySwagger UI to perform READ operations on theCarentity.- Note that you can trigger a manual error by using the
GET: api/cars/{id}/with-random-errorendpoint when you enter-1otherwise it will randomly cause error.
- Note that you can trigger a manual error by using the
- Use the
ResilientApiSwagger UI to perform CRUD operations on theOwnerandCarentities.
The project ResilientApiGateway is the main project that contains the client implementation of the resilient API.
The project is a ASP.NET Core Web Api (8.0 Framework) that can be run locally. ResilientApiGateway communicates with the ResilientApi project to perform READ operations on the Car entity to demonstrate the resilience of the system.
The project ResilientApi is the main project that contains the REST API implementation.
The project is a ASP.NET Core Web Api (8.0 Framework) that can be run locally.The business logic of ResilientApi is contained within the ResilientApi.Data class library project.
There is one specific endpoint that is used by the ResilientApiGateway project to demonstrate the resilience of the system.
It is the GET: api/cars/{id}/-with-random-error endpoint for the Car entity.

