MicroServices
1.0.0
This project is a microservices-based architecture implemented using .NET 8 and Entity Framework Core. The solution consists of three micro-services: UserService, ProductService, and OrderService. MainService handle interactions between these services using Ocelot API Gateway where each is responsible for its own domain.
UserService
, ProductService
, and OrderService
.POST GET /users/{id}
to /api/users/{id}
POST GET /products/{id}
to /api/products/{id}
POST GET /orders/{id}
to /api/orders/{id}
GET /api/users
- Retrieve all users.GET /api/users/{id}
- Retrieve a user by ID.POST /api/users
- Add a new user.GET /api/products
- Retrieve all products.GET /api/products/{id}
- Retrieve a product by ID.POST /api/products
- Add a new product.GET /api/orders
- Retrieve all orders.GET /api/orders/{id}
- Retrieve an order by ID.POST /api/orders
- Create a new order.GET /api/orders/details/{id}
- Retrieve order details, including user and product information.
GET /api/users/{id}
and GET /api/products/{id}
from these services to retrieve user and product information.Each service has its own database context and is configured to use Entity Framework Core for data access. The services are set up to communicate with each other through HTTP requests.
UserDto
, ProductDto
, OrderDto
UserService
, ProductService
and OrderService
to be running.
MainService
simplifies the interaction with the microservices by providing a unified interface.UserContext
User
ProductContext
Product
OrderContext
Order
Each service includes Swagger for testing. You can access these at the following URLs:
https://localhost:7188/swagger
https://localhost:7197/swagger
https://localhost:7138/swagger
Each service is accessible from MainService. You can access these by making GET
or POST
request in Postman:
https://localhost:7133/users/
https://localhost:7133/products/
https://localhost:7133/orders/