???????
??????????????AutoMapper??????÷????????????????п?????????????AutoMapper???????Mapping?????????????????????????????????Map?????????????ζ????Create?????AutoMapper??????Щ????????????????????????AutoMapper?????á?
?????????
????AutoMapper????????????????Mapper.Initialize???????????????????????Web??ó????????Global.asax??д???????????????ó???????????????CreateMap??????д??????????£?
????1 Mapper.Initialize(cfg => {
????2     Mapper.CreateMap<CalendarEvent?? CalendarEventForm>()
????3          .ForMember(dest => dest.EventDate?? opt => opt.MapFrom(src => src.Date.Date))
????4          .ForMember(dest => dest.EventHour?? opt => opt.MapFrom(src => src.Date.Hour))
????5          .ForMember(dest => dest.EventMinute?? opt => opt.MapFrom(src => src.Date.Minute));
????6 });
????OK???????????????????????cfg???????????????????????
??????????????????Config?????????к??????????????????????????CreateMap???????????????????????£???????????????????????????????????????????
?????????????????????У???????????????Global.asax??д?????CreateMap????????????????????????????д??????????????????????????????AutoMapper??????????????????????????????????????д??????????????
??????????? ??Profile??
??????????windows??????????netsh wlan profile?????????Profile????????????????????AutoMapper??淶???????????????????????????????п?????????ЩAutoMapper??????????????????????????????????AutoMapper?????????á?
????????????AutoMapper?????????????????
????1 public class OrganizationProfile : Profile
????2 {
????3     protected override void Configure()
????4     {
????5         //??CreateMap??????
????6     }
????7
????8     //?????????????????????????????
????9     public override string ProfileName
????10     {
????11         get { return this.GetType().Name; }
????12     }
????13 }
??????????????????????????AutoMapper?????????????
????1 Mapper.Initialize(cfg => {
????2
????3     cfg.AddProfile<OrganizationProfile>();
????4 });
????????????????????????????????????????????Profile???и????????????????Profile??????Map???????????Mapping???Щ???????磺
????public class OrganizationProfile : Profile
????{
????protected override void Configure()
????{
????//Mapper.CreateMapд?????... Etc.. here
????SourceMemberNamingConvention = new LowerUnderscoreNamingConvention();
????DestinationMemberNamingConvention = new PascalCaseNamingConvention();
????}
????}
????SourceMemberNamingConvention?????????????????????????????propertyName -> propertyName???????????????????????????????LowerUnderscoreNamingConvention?? ??property_name -> PropertyName
????DestinationMemberNamingConvention???????????????????????????PascalCaseNamingConvention????????Pascal????????????????????????????Convention??AutoMapper????????????????????????Convention????????????????AutoMapper??????????????????