Maybe it will dup , but I didn't found anything that will help me to fix the problem.
I have Controller that can Have different ViewModels :
I would like to do something like:
[HttpPost]
public ActionResult ExportToExcell(ILeadsViewModel model)
{
}
My ViewModels are:
public class ViewModelTest1 : ILeadsViewModel
public class ViewModelTest2 : ILeadsViewModel
public class ViewModelTest3 : ILeadsViewModel
Is there any chance to configure Unity return right instance for my ViewModel ? If possible how ? If possible , but you dont suggesting to this , please explain why.
Thanks.