lixiaojun
2024-10-12 f2333318a31e92f6cbc3a572d8eb9fae9da0f892
BLL/HStation.BLL.Assets.Core/04-bll/07-ThreeLinkManage/ThreeLinkMain_Instance.cs
@@ -2,83 +2,83 @@
namespace HStation.BLL
{
    public partial class ThreeLinkMain
    public partial class AssetsThreelinkMain
    {
        //dto to vmo
        internal static HStation.Vmo.ThreeLinkMainVmo Dto2Vmo(ThreeLinkMainDto dto)
        internal static HStation.Vmo.AssetsThreelinkMainVmo Dto2Vmo(AssetsThreelinkMainDto dto)
        {
            if (dto == null)
            {
                return default;
            }
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.Assets.ThreeLinkMainDto, HStation.Vmo.ThreeLinkMainVmo>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.Assets.AssetsThreelinkMainDto, HStation.Vmo.AssetsThreelinkMainVmo>()
            ).CreateMapper();
            var vmo = mapper.Map<ThreeLinkMainDto, HStation.Vmo.ThreeLinkMainVmo>(dto);
            var vmo = mapper.Map<AssetsThreelinkMainDto, HStation.Vmo.AssetsThreelinkMainVmo>(dto);
            return vmo;
        }
        //dto to vmos
        internal static List<HStation.Vmo.ThreeLinkMainVmo> Dto2Vmos(List<ThreeLinkMainDto> dtos)
        internal static List<HStation.Vmo.AssetsThreelinkMainVmo> Dto2Vmos(List<AssetsThreelinkMainDto> dtos)
        {
            if (dtos == null || dtos.Count < 1)
            {
                return default;
            }
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<ThreeLinkMainDto, HStation.Vmo.ThreeLinkMainVmo>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<AssetsThreelinkMainDto, HStation.Vmo.AssetsThreelinkMainVmo>()
            ).CreateMapper();
            var vmos = mapper.Map<List<ThreeLinkMainDto>, List<HStation.Vmo.ThreeLinkMainVmo>>(dtos);
            var vmos = mapper.Map<List<AssetsThreelinkMainDto>, List<HStation.Vmo.AssetsThreelinkMainVmo>>(dtos);
            return vmos;
        }
        //vmo to add dto
        internal static HStation.Dto.Assets.AddThreeLinkMainInput Vmo2AddDto(HStation.Vmo.ThreeLinkMainVmo vmo)
        internal static HStation.Dto.Assets.AddAssetsThreelinkMainInput Vmo2AddDto(HStation.Vmo.AssetsThreelinkMainVmo vmo)
        {
            if (vmo == null)
            {
                return default;
            }
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.ThreeLinkMainVmo, HStation.Dto.Assets.AddThreeLinkMainInput>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsThreelinkMainVmo, HStation.Dto.Assets.AddAssetsThreelinkMainInput>()
            ).CreateMapper();
            var dto = mapper.Map<HStation.Vmo.ThreeLinkMainVmo, HStation.Dto.Assets.AddThreeLinkMainInput>(vmo);
            var dto = mapper.Map<HStation.Vmo.AssetsThreelinkMainVmo, HStation.Dto.Assets.AddAssetsThreelinkMainInput>(vmo);
            return dto;
        }
        //vmo to add dtos
        internal static List<HStation.Dto.Assets.AddThreeLinkMainInput> Vmo2AddDtos(List<HStation.Vmo.ThreeLinkMainVmo> vmoList)
        internal static List<HStation.Dto.Assets.AddAssetsThreelinkMainInput> Vmo2AddDtos(List<HStation.Vmo.AssetsThreelinkMainVmo> vmoList)
        {
            if (vmoList == null || vmoList.Count < 1)
            {
                return default;
            }
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.ThreeLinkMainVmo, HStation.Dto.Assets.AddThreeLinkMainInput>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsThreelinkMainVmo, HStation.Dto.Assets.AddAssetsThreelinkMainInput>()
            ).CreateMapper();
            var dtoList = mapper.Map<List<HStation.Vmo.ThreeLinkMainVmo>, List<HStation.Dto.Assets.AddThreeLinkMainInput>>(vmoList);
            var dtoList = mapper.Map<List<HStation.Vmo.AssetsThreelinkMainVmo>, List<HStation.Dto.Assets.AddAssetsThreelinkMainInput>>(vmoList);
            return dtoList;
        }
        //vmo to update dto
        internal static HStation.Dto.Assets.UpdateThreeLinkMainInput Vmo2UpdateDto(HStation.Vmo.ThreeLinkMainVmo vmo)
        internal static HStation.Dto.Assets.UpdateAssetsThreelinkMainInput Vmo2UpdateDto(HStation.Vmo.AssetsThreelinkMainVmo vmo)
        {
            if (vmo == null)
            {
                return default;
            }
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.ThreeLinkMainVmo, HStation.Dto.Assets.UpdateThreeLinkMainInput>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsThreelinkMainVmo, HStation.Dto.Assets.UpdateAssetsThreelinkMainInput>()
            ).CreateMapper();
            var dto = mapper.Map<HStation.Vmo.ThreeLinkMainVmo, HStation.Dto.Assets.UpdateThreeLinkMainInput>(vmo);
            var dto = mapper.Map<HStation.Vmo.AssetsThreelinkMainVmo, HStation.Dto.Assets.UpdateAssetsThreelinkMainInput>(vmo);
            return dto;
        }
        //vmo to update dtos
        internal static List<HStation.Dto.Assets.UpdateThreeLinkMainInput> Vmo2UpdateDtos(List<HStation.Vmo.ThreeLinkMainVmo> vmoList)
        internal static List<HStation.Dto.Assets.UpdateAssetsThreelinkMainInput> Vmo2UpdateDtos(List<HStation.Vmo.AssetsThreelinkMainVmo> vmoList)
        {
            if (vmoList == null || vmoList.Count < 1)
            {
                return default;
            }
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.ThreeLinkMainVmo, HStation.Dto.Assets.UpdateThreeLinkMainInput>()
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsThreelinkMainVmo, HStation.Dto.Assets.UpdateAssetsThreelinkMainInput>()
            ).CreateMapper();
            var dtoList = mapper.Map<List<HStation.Vmo.ThreeLinkMainVmo>, List<HStation.Dto.Assets.UpdateThreeLinkMainInput>>(vmoList);
            var dtoList = mapper.Map<List<HStation.Vmo.AssetsThreelinkMainVmo>, List<HStation.Dto.Assets.UpdateAssetsThreelinkMainInput>>(vmoList);
            return dtoList;
        }
    }