tx
2025-04-22 e0b138b3e057de6f57021e6c8963868f5c5acc5a
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
using System.Collections.Generic;
using System.Linq;
 
namespace TProduct.BLL
{
    public partial class SoftSetting
    {
        //Entity to Model
        private TProduct.Model.SoftSetting Entity2Model(TProduct.Entity.SoftSetting entity)
        {
            if (entity == null)
                return default;
            return TProduct.AutoMapperHelper.GetSingle<TProduct.Entity.SoftSetting, TProduct.Model.SoftSetting>(entity);
        }
        //Entities to Models
        private List<TProduct.Model.SoftSetting> Entity2Models(List<TProduct.Entity.SoftSetting> entities)
        {
            if (entities == null || entities.Count() < 1)
                return default;
            return TProduct.AutoMapperHelper.GetMultiple<TProduct.Entity.SoftSetting, TProduct.Model.SoftSetting>(entities);
        }
 
        //Model to Entity
        private TProduct.Entity.SoftSetting Model2Entity(TProduct.Model.SoftSetting model)
        {
            if (model == null)
                return default;
            return TProduct.AutoMapperHelper.GetSingle<TProduct.Model.SoftSetting, TProduct.Entity.SoftSetting>(model);
        }
 
        //Models to Entities
        private List<TProduct.Entity.SoftSetting> Model2Entities(List<TProduct.Model.SoftSetting> models)
        {
            if (models == null || models.Count < 1)
                return default;
            return TProduct.AutoMapperHelper.GetMultiple<TProduct.Model.SoftSetting, TProduct.Entity.SoftSetting>(models);
        }
 
 
        //Model to Entity
        private void Model2Entity(TProduct.Model.SoftSetting model, TProduct.Entity.SoftSetting entity)
        {
            if (model == null || entity == null)
                return;
            TProduct.AutoMapperHelper.Map<TProduct.Model.SoftSetting, TProduct.Entity.SoftSetting>(model, entity);
        }
    }
}