Reputation: 3147
I have following classes in my web api business layer, i was wondering if GatewayService class should be in Business layer or should i put that in separate project called BusinessService? because its not being directly called in controller class and it doesn't depend on data repository ?
Business Layer
Here is what Transaction Controller doing;
Transaction Controller
Getting a list of users from < UserService >
Passing a list of Users to < TransactionService > which will then return a list of user transactions
Passing a list of all transactions to < TransactionService > to process them through a data repository class
Upvotes: 3
Views: 3573
Reputation:
It would be a part of the business layer. The business layer is where you would implement the external requirements for your system fx. logistics and so. Which falls under the same category as your gateway service.
Upvotes: 0
Reputation: 7228
In case of N-Layer architecture
TransactionService
should be in an Application
layer, then your GatewayService
can be part of the Business Layer
.
In case of Clean Architecture
GatewayService
should be part of Presistence
or Infrastracture
layer so it is not a business
layer (here domain
and application
).
Upvotes: 1