Multiple classes defining same props vs inherit from base class
Say I have multiple service classes, here's two as an example:
Instead of repeating the two private properties and the ctor on every service class, would it be acceptable to create a base class which the service classes inherit from? E.g:
I'm just approaching this from a DRY point of view. Technically I'm still repeating myself with the ctor in every service class, but it just seems cleaner? Some guidance would be much appreciated
Instead of repeating the two private properties and the ctor on every service class, would it be acceptable to create a base class which the service classes inherit from? E.g:
I'm just approaching this from a DRY point of view. Technically I'm still repeating myself with the ctor in every service class, but it just seems cleaner? Some guidance would be much appreciated