简化对象映射Mapper,简化自定义仓储

This commit is contained in:
橙子
2023-02-06 23:08:12 +08:00
parent 1d7c17e253
commit fdd1eda9ec
37 changed files with 64 additions and 523 deletions

View File

@@ -1,24 +0,0 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.BBS.Application.Contracts.Exhibition.Dtos;
using Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner;
using Yi.BBS.Domain.Exhibition.Entities;
namespace Yi.BBS.Application.Exhibition.MapperConfig
{
public class BannerProfile: Profile
{
public BannerProfile()
{
CreateMap<BannerGetListInputVo, BannerEntity>();
CreateMap<BannerCreateInputVo, BannerEntity>();
CreateMap<BannerUpdateInputVo, BannerEntity>();
CreateMap<BannerEntity, BannerGetListOutputDto>();
CreateMap<BannerEntity, BannerGetOutputDto>();
}
}
}

View File

@@ -7,7 +7,7 @@ using Yi.BBS.Application.Contracts.Forum.Dtos.Discuss;
using Microsoft.AspNetCore.Mvc;
using Yi.Framework.Ddd.Dtos;
using Yi.BBS.Domain.Forum;
using AutoMapper;
using MapsterMapper;
using SqlSugar;
using Microsoft.AspNetCore.Routing;
using Yi.BBS.Domain.Shared.Forum.ConstClasses;

View File

@@ -1,24 +0,0 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.BBS.Application.Contracts.Forum.Dtos;
using Yi.BBS.Domain.Forum.Entities;
namespace Yi.BBS.Application.Forum.MapperConfig
{
public class ArticleProfile: Profile
{
public ArticleProfile()
{
CreateMap<ArticleGetListInputVo, ArticleEntity>();
CreateMap<ArticleCreateInputVo, ArticleEntity>();
CreateMap<ArticleUpdateInputVo, ArticleEntity>();
CreateMap<ArticleEntity, ArticleAllOutputDto>();
CreateMap<ArticleEntity, ArticleGetListOutputDto>();
CreateMap<ArticleEntity, ArticleGetOutputDto>();
}
}
}

View File

@@ -1,23 +0,0 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.BBS.Application.Contracts.Forum.Dtos;
using Yi.BBS.Domain.Forum.Entities;
namespace Yi.BBS.Application.Forum.MapperConfig
{
public class CommentProfile: Profile
{
public CommentProfile()
{
CreateMap<CommentGetListInputVo, CommentEntity>();
CreateMap<CommentCreateInputVo, CommentEntity>();
CreateMap<CommentUpdateInputVo, CommentEntity>();
CreateMap<CommentEntity, CommentGetListOutputDto>();
CreateMap<CommentEntity, CommentGetOutputDto>();
}
}
}

View File

@@ -1,24 +0,0 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.BBS.Application.Contracts.Forum.Dtos;
using Yi.BBS.Application.Contracts.Forum.Dtos.Discuss;
using Yi.BBS.Domain.Forum.Entities;
namespace Yi.BBS.Application.Forum.MapperConfig
{
public class DiscussProfile: Profile
{
public DiscussProfile()
{
CreateMap<DiscussGetListInputVo, DiscussEntity>();
CreateMap<DiscussCreateInputVo, DiscussEntity>();
CreateMap<DiscussUpdateInputVo, DiscussEntity>();
CreateMap<DiscussEntity, DiscussGetListOutputDto>();
CreateMap<DiscussEntity, DiscussGetOutputDto>();
}
}
}

View File

@@ -1,23 +0,0 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.BBS.Application.Contracts.Forum.Dtos;
using Yi.BBS.Domain.Forum.Entities;
namespace Yi.BBS.Application.Forum.MapperConfig
{
public class MyTypeProfile: Profile
{
public MyTypeProfile()
{
CreateMap<MyTypeGetListInputVo, MyTypeEntity>();
CreateMap<MyTypeCreateInputVo, MyTypeEntity>();
CreateMap<MyTypeUpdateInputVo, MyTypeEntity>();
CreateMap<MyTypeEntity, MyTypeGetListOutputDto>();
CreateMap<MyTypeEntity, MyTypeOutputDto>();
}
}
}

View File

@@ -1,24 +0,0 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.BBS.Application.Contracts.Forum.Dtos;
using Yi.BBS.Application.Contracts.Forum.Dtos.Plate;
using Yi.BBS.Domain.Forum.Entities;
namespace Yi.BBS.Application.Forum.MapperConfig
{
public class PlateProfile: Profile
{
public PlateProfile()
{
CreateMap<PlateGetListInputVo, PlateEntity>();
CreateMap<PlateCreateInputVo, PlateEntity>();
CreateMap<PlateUpdateInputVo, PlateEntity>();
CreateMap<PlateEntity, PlateGetListOutputDto>();
CreateMap<PlateEntity, PlateGetOutputDto>();
}
}
}