You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AdMappingProfile.cs 690B

1234567891011121314151617181920212223
  1. namespace Diligent.WebAPI.Business.MappingProfiles
  2. {
  3. public class AdMappingProfile : Profile
  4. {
  5. [ExcludeFromCodeCoverage]
  6. public AdMappingProfile()
  7. {
  8. #region DTO to Model
  9. CreateMap<AdCreateDto, Ad>();
  10. CreateMap<AdUpdateDto, Ad>();
  11. #endregion
  12. #region Model to DTO
  13. CreateMap<Ad, AdResponseDto>();
  14. CreateMap<Ad, AdDetailsResponseDto>();
  15. CreateMap<Ad, AdApplicantsViewDto>();
  16. CreateMap<Ad, AdResponseWithCountDto>()
  17. .ForMember(dest => dest.Count, opt => opt.MapFrom(x => x.Applicants.Count));
  18. #endregion
  19. }
  20. }
  21. }