C# Call One Microservice from another MicroService

Viewed 849

I want to call one microservice from another service. I am developing these services in C# and deploying in lambda. Here is my scenario. I have a Coupon service and a customer service.

UI calls the coupon service to check if the customer is eligible for a customer with customer id and coupon id.

Coupon service needs to call the customer service to get the customer details even before any coupon business logic happens.

My question is, can I call the customer service from the action filter of the coupon service so the customer details will be retrieved before the controller call and necessary customer details will be available?

Is this a good coding practice?

0 Answers
Related