yangyin
2024-08-20 98e49c0dd42840a094837f7acae532bc237a719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
namespace HStation.BLL
{
    public partial class XhsValveMainPhartMapping
    {
        //Dto to Vmo
        private static Vmo.XhsValveMainPhartMapping Dto2Vmo(Dto.XhsValveMainPhartMappingDto dto)
        {
            if (dto == null)
                return default;
            var vmo = dto.Adapt<Dto.XhsValveMainPhartMappingDto, Vmo.XhsValveMainPhartMapping>();
            return vmo;
        }
 
        //Vmos to Dtos
        private static List<Vmo.XhsValveMainPhartMapping> Dtos2Vmos(List<Dto.XhsValveMainPhartMappingDto> dtos)
        {
            if (dtos == null || dtos.Count() < 1)
                return default;
            var vmos = dtos.Adapt<List<Dto.XhsValveMainPhartMappingDto>, List<Vmo.XhsValveMainPhartMapping>>();
            return vmos;
        }
 
        //Vmo to Dto
        private static Dto.XhsValveMainPhartMappingDto Vmo2Dto(Vmo.XhsValveMainPhartMapping vmo)
        {
            if (vmo == null)
                return default;
            var model = vmo.Adapt<Vmo.XhsValveMainPhartMapping, Dto.XhsValveMainPhartMappingDto>();
            return model;
        }
 
        //Vmos to Dtos
        private static List<Dto.XhsValveMainPhartMappingDto> Vmos2Dtos(List<Vmo.XhsValveMainPhartMapping> vmos)
        {
            if (vmos == null || vmos.Count() < 1)
                return default;
            var models = vmos.Adapt<List<Vmo.XhsValveMainPhartMapping>, List<Dto.XhsValveMainPhartMappingDto>>();
            return models;
        } 
 
        //Vmo to AddInput
        private static Dto.AddXhsValveMainPhartMappingInput Vmo2AddInput(Vmo.XhsValveMainPhartMapping vmo)
        {
            if (vmo == null)
                return default;
            var input = vmo.Adapt<Vmo.XhsValveMainPhartMapping, Dto.AddXhsValveMainPhartMappingInput>();
            return input;
        } 
 
        //Vmo to UpdateInput
        private static Dto.UpdateXhsValveMainPhartMappingInput Vmo2UpdateInput(Vmo.XhsValveMainPhartMapping vmo)
        {
            if (vmo == null)
                return default;
            var input = vmo.Adapt<Vmo.XhsValveMainPhartMapping, Dto.UpdateXhsValveMainPhartMappingInput>();
            return input;
        } 
 
    }
}