2025-05-06 06:45:49 +00:00
|
|
|
|
using AutoMapper;
|
2025-06-19 14:51:10 +00:00
|
|
|
|
using Kurs.Platform.Blog;
|
|
|
|
|
|
using Kurs.Platform.Forum;
|
2025-05-06 06:45:49 +00:00
|
|
|
|
|
|
|
|
|
|
namespace Kurs.Platform;
|
|
|
|
|
|
|
|
|
|
|
|
public class PlatformApplicationAutoMapperProfile : Profile
|
|
|
|
|
|
{
|
|
|
|
|
|
public PlatformApplicationAutoMapperProfile()
|
|
|
|
|
|
{
|
2025-06-19 14:51:10 +00:00
|
|
|
|
/* You can configure your AutoMapper mapping configuration here.
|
|
|
|
|
|
* Alternatively, you can split your mapping configurations
|
|
|
|
|
|
* into multiple profile classes for a better organization. */
|
2025-05-06 06:45:49 +00:00
|
|
|
|
|
2025-06-19 14:51:10 +00:00
|
|
|
|
// Blog mappings
|
|
|
|
|
|
CreateMap<BlogCategory, BlogCategoryDto>();
|
|
|
|
|
|
CreateMap<BlogPost, BlogPostDto>();
|
|
|
|
|
|
CreateMap<BlogPost, BlogPostListDto>();
|
|
|
|
|
|
|
|
|
|
|
|
// Forum mappings
|
|
|
|
|
|
CreateMap<ForumCategory, ForumCategoryDto>();
|
|
|
|
|
|
CreateMap<ForumTopic, ForumTopicDto>();
|
|
|
|
|
|
CreateMap<ForumTopic, ForumTopicListDto>()
|
|
|
|
|
|
.ForMember(dest => dest.CreatedAt, opt => opt.MapFrom(src => src.CreationTime));
|
2025-05-06 06:45:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|