I know that I can configure the autoMapper by adding an internal Mapping class and setting IgnoreAllPropertiesWithAnInaccessibleSetter(); When I need to include fields in the ViewModel that’s not in the page definition.
But Is there also a way to skip using the Mapping class and annotate just the extra fields that you want to exclude?
Litium version: 6.1
AutoMapper does not have logic for annotation based mapping. It exists other project that will bring in that support but nothing that I have tested and or that I can recommend.
Example the AutoMapper.Attributes is one project (most popular) that can help out with that, but that project is abandon and the author has create a blogpost about why you should not use annotation, see https://medium.com/@schneidenbach/lessons-learned-from-dabbling-in-open-source-4ac654b1580e