24小时一体机服务
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.

65 lines
1.9 KiB

using AutoMapper;
using Elight.Entity.APPDto.Lawyer;
using Elight.Entity.AppMode.Lawyer;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Elight.Entity
{
public class AuthManageProfile : Profile
{
public AuthManageProfile()
{
this.CreateCusMap<App_Sys_AddLawyerInput, App_Sys_UserModel>();
CreateMap<JZJBXX, JZJBXXDto>().ReverseMap();
CreateMap<JZML, JZMLDto>().ReverseMap();
CreateMap<JZWJItem, JZWJItemDto>().ReverseMap();
CreateMap<LawyerArchives, LawyerArchivesDto>().ReverseMap();
CreateMap<App_LawyerServicesModel, QRLawyerServiceDto>().ReverseMap();
CreateMap<App_Sys_UserModel, QRUserDto>().ReverseMap();
//CreateMap<App_Sys_AddLawyerInput, App_Sys_UserModel>();
CreateMap<App_CloudCabinetModel, App_CloudCabinetDto>();
CreateMap<App_ConfessionModel, App_ConfessionDto>();
CreateMap<App_DocumentModel, App_DocumentDto>();
CreateMap<App_HearingModel, App_HearingDto>();
CreateMap<App_LawyerServicesModel, App_LawyerServicesDto>();
CreateMap<App_ReceptionModel, App_ReceptionDto>();
CreateMap<App_RemoteModel, App_RemoteDto>();
//用户管理
CreateMap<App_Sys_UserDto, App_Sys_UserModel>();
}
}
public static class AutoMapperProFileExtension
{
public static void CreateCusMap<Source, Destination>(this Profile profile)
{
profile.CreateMap<Source, Destination>().ForAllMembers(opt =>
{
opt.UseDestinationValue();
opt.Condition((s, e, r, t) =>
{
if (r == null)
{
return false;
}
else { return true; }
});
});
}
}
}