| 12345678910111213141516171819202122232425 |
-
- using System.Diagnostics.CodeAnalysis;
-
- namespace Diligent.WebAPI.Business.MappingProfiles
- {
- public class AdMappingProfile : Profile
- {
- [ExcludeFromCodeCoverage]
- public AdMappingProfile()
- {
- #region DTO to Model
- CreateMap<AdCreateDto, Ad>();
- CreateMap<AdUpdateDto, Ad>();
- #endregion
-
- #region Model to DTO
- CreateMap<Ad, AdResponseDto>();
- CreateMap<Ad, AdDetailsResponseDto>();
- CreateMap<Ad, AdApplicantsViewDto>();
- CreateMap<Ad, AdResponseWithCountDto>()
- .ForMember(dest => dest.Count, opt => opt.MapFrom(x => x.Applicants.Count));
- #endregion
- }
- }
- }
|