internal static void ConfigureAutoMapper() { ProgramDataMapper.ConfigureAutoMapper(); PaymentDataMapper.ConfigureAutoMapper(); if (AutoMapper.Mapper.FindTypeMapFor <PlayerSeason, DTO.PlayerSeason>() == null) { AutoMapper.Mapper.CreateMap <PlayerSeason, DTO.PlayerSeason>() .ForMember(season => season.Programs, programs => programs.ResolveUsing <PlayerSeasonProgramsDTOResolver>()) .ForMember(season => season.Payments, payments => payments.ResolveUsing <PlayerSeasonPaymentsDTOResolver>()); } if (AutoMapper.Mapper.FindTypeMapFor <DTO.PlayerSeason, PlayerSeason>() == null) { AutoMapper.Mapper.CreateMap <DTO.PlayerSeason, PlayerSeason>(); } #if DEBUG AutoMapper.Mapper.AssertConfigurationIsValid(); #endif }
static PaymentDataMapper() { PaymentDataMapper.ConfigureAutoMapper(); }