Aug 29, 2012 at 6:52 PM
Edited Aug 29, 2012 at 7:37 PM
When I have to map a Dinner to a DinnerViewModel and the other way round this constructor parameter seem fine.
but if I have different mvc actions where I need to show different viewModel from one entity type then I have
public DinnerController(ICrudService<Dinner> s, IMapper<Dinner, DinnerInput> v) : base(s, v)
to make a constructor like this:
public DinnerController(ICrudService<Dinner> s, IMapper<Dinner, OpenDinnerViewModel> mapper1,IMapper<Dinner,DeleteDinnerViewModel> mapper2,etc...)
What if I want to inject into the constructor this:
then I have to pass 4 Imapper instances.
a new controller with all that parameters is stupid.
With AutoMapper I have IMapperEngine and not more!
You have something similar I could use?