using EntrustSettle.Model.Models;
using EntrustSettle.Model.Dtos;
using Mapster;
using Microsoft.Extensions.DependencyInjection;
namespace EntrustSettle.Extensions
{
///
/// Mapster 启动服务
///
public static class MapsterSetup
{
public static void AddMapsterSetup(this IServiceCollection services)
{
//TypeAdapterConfig.GlobalSettings.Default.NameMatchingStrategy(NameMatchingStrategy.Flexible);
//TypeAdapterConfig.GlobalSettings.Default.PreserveReference(true);
// 添加映射规则
//TypeAdapterConfig.NewConfig()
// .TwoWays()
// .Map(dest => dest.uID, src => src.Id)
// .Map(dest => dest.RIDs, src => src.RIDs)
// .Map(dest => dest.addr, src => src.Address)
// .Map(dest => dest.tdIsDelete, src => src.IsDeleted)
// .Map(dest => dest.RoleNames, src => src.RoleNames);
}
}
}