@@ -67,7 +67,7 @@ internal sealed partial class DogMapper
6767 [ MapProperty ( nameof ( Dog . NullStr ) , nameof ( DogDto . StringNull ) ) ]
6868 internal partial DogDto ToDogDto ( Dog dog ) ;
6969
70- internal partial ICollection < DogDto > ToDogDto ( ICollection < Dog > dogs ) ;
70+ internal partial ICollection < DogDto > ToDogDtos ( ICollection < Dog > dogs ) ;
7171
7272 #endregion
7373
@@ -79,11 +79,51 @@ internal static partial class DogProjectToMapper
7979
8080 #region Constants & Statics
8181
82- [ MapProperty ( nameof ( Dog . NullStr ) , nameof ( DogDto . StringNull ) ) ]
82+ [ IncludeMappingConfiguration ( nameof ( @DogMapper . ToDogDto ) ) ]
8383 private static partial DogDto ToDogDto ( Dog dog ) ;
8484
8585 internal static partial IQueryable < DogDto > ProjectToDogDto ( this IQueryable < Dog > query ) ;
8686
8787 #endregion
8888
8989}
90+
91+ [ Mapper ]
92+ internal static partial class DogProjectToWithCustomMapper
93+ {
94+
95+ #region Constants & Statics
96+
97+ private static string StringNullSet ( string ? source )
98+ {
99+ return source ?? "default str" ;
100+ }
101+
102+ [ MapProperty ( nameof ( Dog . NullStr ) , nameof ( DogDto . StringNull ) , Use = nameof ( StringNullSet ) ) ]
103+ private static partial DogDto ToDogDto ( Dog dog ) ;
104+
105+ internal static partial IQueryable < DogDto > ProjectToDogDto2 ( this IQueryable < Dog > query ) ;
106+
107+ #endregion
108+
109+ }
110+
111+ [ Mapper ]
112+ internal static partial class DogDtoExtensionsMapper
113+ {
114+
115+ #region Constants & Statics
116+
117+ private static string StringNullSet ( Dog dog )
118+ {
119+ return dog . NullStr ?? "default str" ;
120+ }
121+
122+ [ MapPropertyFromSource ( nameof ( DogDto . StringNull ) , Use = nameof ( StringNullSet ) ) ]
123+ [ MapperIgnoreTarget ( nameof ( DogDto . Name ) ) ]
124+ [ MapperIgnoreTarget ( nameof ( DogDto . NumberOfWheels ) ) ]
125+ internal static partial void FromDog ( [ MappingTarget ] this DogDto dogDto , Dog dog ) ;
126+
127+ #endregion
128+
129+ }
0 commit comments