my target is to abstract as much as possible, so i thought something generic for converting from a model (entity) to a viewmodel.
I'd like something like this:
IEntityToModelMapper mapper;
mapper.Convert<MyModel>().Map<MyViewModel>();
or even:
GenericViewModel model = _mapper.Convert<MyModel>();
When "GenericViewModel" is a base class of all ViewModel, but in this case i'd have problem with casting objects. Maybe an Interface?
Mine are just attempts. How would you implement this?
Thanks