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(entity); } //Entities to Models private List Entity2Models(List entities) { if (entities == null || entities.Count() < 1) return default; return TProduct.AutoMapperHelper.GetMultiple(entities); } //Model to Entity private TProduct.Entity.SoftSetting Model2Entity(TProduct.Model.SoftSetting model) { if (model == null) return default; return TProduct.AutoMapperHelper.GetSingle(model); } //Models to Entities private List Model2Entities(List models) { if (models == null || models.Count < 1) return default; return TProduct.AutoMapperHelper.GetMultiple(models); } //Model to Entity private void Model2Entity(TProduct.Model.SoftSetting model, TProduct.Entity.SoftSetting entity) { if (model == null || entity == null) return; TProduct.AutoMapperHelper.Map(model, entity); } } }