public void CreateMappings(IMapperConfigurationExpression configuration) { configuration.CreateMap <Album, AlbumListViewModel>() .ForMember(m => m.Title, opt => opt.MapFrom(c => MappingFunctions.MapTitle(c))) .ForMember(m => m.Width, opt => opt.MapFrom(c => MappingFunctions.MapWidth(c))) .ForMember(m => m.Height, opt => opt.MapFrom(c => MappingFunctions.MapHeight(c))) .ForMember(m => m.ImagesCountCover, opt => opt.MapFrom(c => MappingFunctions.MapImagesCountCover(c))) .ForMember(m => m.CoverImage, opt => opt.MapFrom(c => MappingFunctions.MapCoverImage(c))) .ForMember(m => m.Date, opt => opt.MapFrom(c => MappingFunctions.MapDate(c))); }
public void CreateMappings(IMapperConfigurationExpression configuration) { configuration.CreateMap <Album, AlbumViewModel>() .ForMember(m => m.Title, opt => opt.MapFrom(c => MappingFunctions.MapTitle(c))) .ForMember(m => m.Description, opt => opt.MapFrom(c => MappingFunctions.MapDescription(c))) .ForMember(m => m.ImagesCountCover, opt => opt.MapFrom(c => MappingFunctions.MapImagesCountCover(c))) .ForMember(m => m.CoverImage, opt => opt.MapFrom(c => MappingFunctions.MapCoverImage(c))) .ForMember(m => m.FbImage, opt => opt.MapFrom(c => MappingFunctions.MapFbImage(c))) .ForMember(m => m.ImageCoordinates, opt => opt.MapFrom(c => MappingFunctions.MapImageCoordinates(c))) .ForMember(m => m.Date, opt => opt.MapFrom(c => MappingFunctions.MapDate(c))); }