/// <summary>
 /// Ignores readonly properties and the date values
 /// </summary>
 /// <param name="mapping"></param>
 /// <returns></returns>
 public static IMappingExpression <TSource, TDest> IgnoreDeletableEntityCommonProperties <TSource, TDest>(
     this IMappingExpression <TSource, TDest> mapping)
     where TDest : IDeletableEntity
 {
     return(mapping
            .IgnoreEntityCommonProperties()
            .ForMember(dest => dest.DeletedDate, map => map.Ignore()));
 }
コード例 #2
0
 public static IMappingExpression <TSource, PropertyGroup> MapPropertyGroupBasicToPropertyGroupPersistence <TSource, TPropertyTypeBasic>(
     this IMappingExpression <TSource, PropertyGroup> mapping)
     where TSource : PropertyGroupBasic <TPropertyTypeBasic>
     where TPropertyTypeBasic : PropertyTypeBasic
 {
     return(mapping
            .IgnoreEntityCommonProperties()
            .ForMember(dest => dest.Id, map => map.Condition(source => source.Id > 0))
            .ForMember(dest => dest.Key, map => map.Ignore())
            .ForMember(dest => dest.HasIdentity, map => map.Ignore())
            .ForMember(dest => dest.DeletedDate, map => map.Ignore())
            .ForMember(dest => dest.PropertyTypes, map => map.Ignore()));
 }