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);
|
}
|
}
|
}
|