namespace HStation.BLL
|
{
|
/// <summary>
|
///
|
///</summary>
|
public partial class AssetsBluntheadSeries
|
{
|
//dto to vmo
|
internal static Vmo.AssetsBluntheadSeriesVmo Dto2Vmo(Dto.AssetsBluntheadSeriesDto dto)
|
{
|
if (dto == null)
|
{
|
return default;
|
}
|
var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.AssetsBluntheadSeriesDto, Vmo.AssetsBluntheadSeriesVmo>()
|
).CreateMapper();
|
var vmo = mapper.Map<Dto.AssetsBluntheadSeriesDto, Vmo.AssetsBluntheadSeriesVmo>(dto);
|
return vmo;
|
}
|
|
//dto to vmos
|
internal static List<Vmo.AssetsBluntheadSeriesVmo> Dto2Vmos(List<Dto.AssetsBluntheadSeriesDto> dtos)
|
{
|
if (dtos == null || dtos.Count < 1)
|
{
|
return default;
|
}
|
var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.AssetsBluntheadSeriesDto, Vmo.AssetsBluntheadSeriesVmo>()
|
).CreateMapper();
|
var vmos = mapper.Map<List<Dto.AssetsBluntheadSeriesDto>, List<Vmo.AssetsBluntheadSeriesVmo>>(dtos);
|
return vmos;
|
}
|
|
//vmo to add dto
|
internal static Dto.AddAssetsBluntheadSeriesInput Vmo2AddDto(Vmo.AssetsBluntheadSeriesVmo vmo)
|
{
|
if (vmo == null)
|
{
|
return default;
|
}
|
var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsBluntheadSeriesVmo, Dto.AddAssetsBluntheadSeriesInput>()
|
).CreateMapper();
|
var dto = mapper.Map<Vmo.AssetsBluntheadSeriesVmo, Dto.AddAssetsBluntheadSeriesInput>(vmo);
|
return dto;
|
}
|
|
//vmo to add dtos
|
internal static List<Dto.AddAssetsBluntheadSeriesInput> Vmo2AddDtos(List<Vmo.AssetsBluntheadSeriesVmo> vmoList)
|
{
|
if (vmoList == null || vmoList.Count < 1)
|
{
|
return default;
|
}
|
var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsBluntheadSeriesVmo, Dto.AddAssetsBluntheadSeriesInput>()
|
).CreateMapper();
|
var dtoList = mapper.Map<List<Vmo.AssetsBluntheadSeriesVmo>, List<Dto.AddAssetsBluntheadSeriesInput>>(vmoList);
|
return dtoList;
|
}
|
|
//vmo to update dto
|
internal static Dto.UpdateAssetsBluntheadSeriesInput Vmo2UpdateDto(Vmo.AssetsBluntheadSeriesVmo vmo)
|
{
|
if (vmo == null)
|
{
|
return default;
|
}
|
var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsBluntheadSeriesVmo, Dto.UpdateAssetsBluntheadSeriesInput>()
|
).CreateMapper();
|
var dto = mapper.Map<Vmo.AssetsBluntheadSeriesVmo, Dto.UpdateAssetsBluntheadSeriesInput>(vmo);
|
return dto;
|
}
|
|
//vmo to update dtos
|
internal static List<Dto.UpdateAssetsBluntheadSeriesInput> Vmo2UpdateDtos(List<Vmo.AssetsBluntheadSeriesVmo> vmoList)
|
{
|
if (vmoList == null || vmoList.Count < 1)
|
{
|
return default;
|
}
|
var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsBluntheadSeriesVmo, Dto.UpdateAssetsBluntheadSeriesInput>()
|
).CreateMapper();
|
var dtoList = mapper.Map<List<Vmo.AssetsBluntheadSeriesVmo>, List<Dto.UpdateAssetsBluntheadSeriesInput>>(vmoList);
|
return dtoList;
|
}
|
}
|
}
|