選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

AdMappingProfile.cs 730B

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