Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

AdMappingProfile.cs 730B

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