I have a basic table with a few FK references. So when I retrieve an entity for an update operation; that entity contains ICollections
of related entites. I also have a main ViewModel inside which each entity is a sub viewModel. My aim is to use Automapper like:
mapper.Map(MainViewmodel obj,MainEntity obj);
For this I have a MappingConfiguration like:
CreateMap<MainViewModel, MainEntity>();
CreateMap<subViewModel1, subEntity1>();
CreateMap<subViewModel2, subEntity2>();
This gives me an Unmapped properties exception because the ICollections
are not getting mapped. Could anyone please guide me on the best way to deal with this kind of situation?
thanks.