Ejemplo n.º 1
0
        internal static void ConfigureAutoMapper()
        {
            if (AutoMapper.Mapper.FindTypeMapFor <Season, DTO.Season>() == null)
            {
                AutoMapper.Mapper.CreateMap <Season, DTO.Season>()
                .ForMember(season => season.Programs, programs => programs.ResolveUsing <SeasonProgramsDTOResolver>());
            }

            if (AutoMapper.Mapper.FindTypeMapFor <DTO.Season, Season>() == null)
            {
                AutoMapper.Mapper.CreateMap <DTO.Season, Season>();
            }

            ProgramDataMapper.ConfigureAutoMapper();
#if DEBUG
            AutoMapper.Mapper.AssertConfigurationIsValid();
#endif
        }
Ejemplo n.º 2
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
        }
Ejemplo n.º 3
0
 static ProgramDataMapper()
 {
     ProgramDataMapper.ConfigureAutoMapper();
 }