コード例 #1
0
        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
        }
コード例 #2
0
ファイル: PaymentDataMapper.cs プロジェクト: ckjcorrea/Newhl
 static PaymentDataMapper()
 {
     PaymentDataMapper.ConfigureAutoMapper();
 }