简化对象映射Mapper,简化自定义仓储
This commit is contained in:
@@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user