Open Source Web Application Framework for ASP.NET Core
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.
 
 
 
 
 
 

43 lines
1.1 KiB

using AutoMapper;
using Volo.Abp.AutoMapper;
using Volo.CmsKit.Blogs;
using Volo.CmsKit.Comments;
using Volo.CmsKit.Contents;
using Volo.CmsKit.GlobalResources;
using Volo.CmsKit.Menus;
using Volo.CmsKit.Pages;
using Volo.CmsKit.Public.Blogs;
using Volo.CmsKit.Public.Comments;
using Volo.CmsKit.Public.GlobalResources;
using Volo.CmsKit.Public.Ratings;
using Volo.CmsKit.Ratings;
using Volo.CmsKit.Users;
namespace Volo.CmsKit.Public;
public class PublicApplicationAutoMapperProfile : Profile
{
public PublicApplicationAutoMapperProfile()
{
CreateMap<CmsUser, Comments.CmsUserDto>();
CreateMap<Comment, CommentDto>()
.Ignore(x => x.Author);
CreateMap<Comment, CommentWithDetailsDto>()
.Ignore(x => x.Replies)
.Ignore(x => x.Author);
CreateMap<Rating, RatingDto>();
CreateMap<Page, PageDto>()
.Ignore(x => x.ContentFragments);
CreateMap<BlogPost, BlogPostPublicDto>()
.Ignore(x => x.ContentFragments);
CreateMap<MenuItem, MenuItemDto>();
CreateMap<GlobalResource, GlobalResourceDto>();
}
}