Browse Source

Add IgnoreExtraProperties extension method for automapper mapping.

pull/4164/head
Halil İbrahim Kalkan 6 years ago
parent
commit
f0d417c119
  1. 9
      framework/src/Volo.Abp.AutoMapper/AutoMapper/AbpAutoMapperExtensibleDtoExtensions.cs

9
framework/src/Volo.Abp.AutoMapper/AutoMapper/AbpAutoMapperExtensibleDtoExtensions.cs

@ -1,4 +1,5 @@
using System.Collections.Generic;
using Volo.Abp.AutoMapper;
using Volo.Abp.Data;
using Volo.Abp.ObjectExtending;
@ -35,5 +36,13 @@ namespace AutoMapper
})
);
}
public static IMappingExpression<TSource, TDestination> IgnoreExtraProperties<TSource, TDestination>(
this IMappingExpression<TSource, TDestination> mappingExpression)
where TDestination : IHasExtraProperties
where TSource : IHasExtraProperties
{
return mappingExpression.Ignore(x => x.ExtraProperties);
}
}
}
Loading…
Cancel
Save