design pattern question (repository pattern - service layer)

  • Thread starter Thread starter moh85
  • Start date Start date
M

moh85

Guest
Hi,

I am looking for the best practice to implement the following scenario, I am using a repository pattern where I created multiple services and I am calling one service per a controller. My question is which is the best practice to use a service inside another service? I have many options like calling Service A inside Service B by injecting IService A in Service B constructor! or I can use inheritance like Service B can extend Service A then I can use all Service A methods inside Service B like: "class ServiceB : IServiceB, ServiceA"?

B.R,

/M

Continue reading...
 
Back
Top