1
2
3
4
5
6
7
8
// Globally defined ignore for mapping of spesific properties
// In this case: IRinaDokumentModel.Vedlegg and IRinaDokumentModel.OriginalRinaDokument
// for all classes that implement interface IRinaDokumentModel

(Profile)this.ShouldMapProperty = p =>
    !(p.DeclaringType.GetInterface(nameof(IRinaDokumentModel)) != null
      && (p.Name == nameof(IRinaDokumentModel.Vedlegg)
          || p.Name == nameof(IRinaDokumentModel.OriginalRinaDokument)));