| | |
| | | public partial class AssetsPipeLineCoefficient |
| | | { |
| | | //Entity to GetModel |
| | | internal static Model.AssetsPipeLineCoefficient Entity2Model(Entity.AssetsPipeLineCoefficient entity) |
| | | internal static Model.AssetsPipeLineCoefficient Entity2Model(Entity.AssetsPipeCoefficient entity) |
| | | { |
| | | if (entity == null) |
| | | return default; |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.AssetsPipeLineCoefficient, Model.AssetsPipeLineCoefficient>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.AssetsPipeCoefficient, Model.AssetsPipeLineCoefficient>() |
| | | ).CreateMapper(); |
| | | var model = mapper.Map<Entity.AssetsPipeLineCoefficient, Model.AssetsPipeLineCoefficient>(entity); |
| | | var model = mapper.Map<Entity.AssetsPipeCoefficient, Model.AssetsPipeLineCoefficient>(entity); |
| | | return model; |
| | | } |
| | | |
| | | //Entities to GetModels |
| | | internal static List<Model.AssetsPipeLineCoefficient> Entity2Models(List<Entity.AssetsPipeLineCoefficient> entities) |
| | | internal static List<Model.AssetsPipeLineCoefficient> Entity2Models(List<Entity.AssetsPipeCoefficient> entities) |
| | | { |
| | | if (entities == null || entities.Count < 1) |
| | | return default; |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.AssetsPipeLineCoefficient, Model.AssetsPipeLineCoefficient>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.AssetsPipeCoefficient, Model.AssetsPipeLineCoefficient>() |
| | | ).CreateMapper(); |
| | | var models = mapper.Map<List<Entity.AssetsPipeLineCoefficient>, List<Model.AssetsPipeLineCoefficient>>(entities); |
| | | var models = mapper.Map<List<Entity.AssetsPipeCoefficient>, List<Model.AssetsPipeLineCoefficient>>(entities); |
| | | return models; |
| | | } |
| | | |
| | | //Model to Entity |
| | | internal static Entity.AssetsPipeLineCoefficient Model2Entity(Model.AssetsPipeLineCoefficient model) |
| | | internal static Entity.AssetsPipeCoefficient Model2Entity(Model.AssetsPipeLineCoefficient model) |
| | | { |
| | | if (model == null) |
| | | return default; |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsPipeLineCoefficient, Entity.AssetsPipeLineCoefficient>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsPipeLineCoefficient, Entity.AssetsPipeCoefficient>() |
| | | ).CreateMapper(); |
| | | var entity = mapper.Map<Model.AssetsPipeLineCoefficient, Entity.AssetsPipeLineCoefficient>(model); |
| | | var entity = mapper.Map<Model.AssetsPipeLineCoefficient, Entity.AssetsPipeCoefficient>(model); |
| | | return entity; |
| | | } |
| | | |
| | | //Models to Entities |
| | | internal static List<Entity.AssetsPipeLineCoefficient> Model2Entities(List<Model.AssetsPipeLineCoefficient> models) |
| | | internal static List<Entity.AssetsPipeCoefficient> Model2Entities(List<Model.AssetsPipeLineCoefficient> models) |
| | | { |
| | | if (models == null || models.Count < 1) |
| | | return default; |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsPipeLineCoefficient, Entity.AssetsPipeLineCoefficient>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsPipeLineCoefficient, Entity.AssetsPipeCoefficient>() |
| | | ).CreateMapper(); |
| | | var entities = mapper.Map<List<Model.AssetsPipeLineCoefficient>, List<Entity.AssetsPipeLineCoefficient>>(models); |
| | | var entities = mapper.Map<List<Model.AssetsPipeLineCoefficient>, List<Entity.AssetsPipeCoefficient>>(models); |
| | | return entities; |
| | | } |
| | | |
| | | //Model to Entity |
| | | internal static void Model2Entity(Model.AssetsPipeLineCoefficient model, Entity.AssetsPipeLineCoefficient entity) |
| | | internal static void Model2Entity(Model.AssetsPipeLineCoefficient model, Entity.AssetsPipeCoefficient entity) |
| | | { |
| | | if (model == null || entity == null) |
| | | return; |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsPipeLineCoefficient, Entity.AssetsPipeLineCoefficient>() |
| | | var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsPipeLineCoefficient, Entity.AssetsPipeCoefficient>() |
| | | ).CreateMapper(); |
| | | mapper.Map(model, entity); |
| | | } |