I’m using MS Unity Container. And all my modules needs to use a common object where I add the values from a dictionary like this:
Dictionary<Type, Func<BaseItem, BaseItemViewModel>> Maps
And when I use a viewModel, this one receives the common Dictionary.
A partner told me something about configure the Unity, but my knowledge about Unity is few.
Create a service and register it with unity.
For example
Then register with unity in your bootstrapper
Then you can have this injected or use ServiceLocator to resolve the instance from the interface…