Esempio n. 1
0
        public AutoMapperProfile()
        {
            CreateMap <Orc, OrcDetails>();
            CreateMap <OrcCreateItem, Orc>();
            CreateMap <DbOrc, Orc>();
            CreateMap <Orc, DbOrc>();

            CreateMap <WeaponType, DbWeapon>();
            CreateMap <DbWeapon, WeaponType>();
            CreateMap <string, OrcRaceType>().
            ConvertUsing(s => OrcRaceType.Parse(s));
            CreateMap <string, WeaponType>().
            ConvertUsing(s => WeaponType.Parse(s));

            CreateMap <Horde, HordeDetails>();
            CreateMap <Horde, HordeListItem>();
            CreateMap <HordeCreateItem, Horde>();
            CreateMap <Horde, DbHorde>();
            CreateMap <DbHorde, Horde>();
        }