how to inject dependency to base class?

Shiva799Shiva799 Member ✭✭

Hi All,
I have a derived ViewModel and its base ViewModel. The derived ViewModel has few dependencies to be injected in its constructor. Now my doubt is should I pass the dependencies for base ViewModel thru derived ViewModel constructor? Or is there any other way instead of passing those dependencies in all the derived ViewModel for base viewmodel? Has anyone else faced this issue?
Which is the correct way? Passing it to all derived vms or something else?
Please help
Thanks,

Answers

Sign In or Register to comment.