I'm attempting use a base class viewmodel from which all other viewmodels inherit to facilitate sharing between viewmodels. In the base class I use IoC, passing in an IDataService to the constructor.
//IoC
private readonly IDataService _dataService;
public BaseViewModel(IDataService localDataService)
{
_dataService = localDataService;
}
Trouble is when creating a child view model that inherits, the base viewmodel constructor now expects an IDataService. I've seen this post: SQLite Connection Injection but I want to be clear that the proper course is to send the IDataService into the base class from all of my child viewmodels, of which there are about 5. Lacking real IoC understanding I'm concerned this might screw up the dataservice singleton.
Thanks Mark