using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace IStation.Service
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public static class BasicExtensions
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public static List<Entity.SpecialPropertyMappingSelected> ToEntityList(this List<Model.SpecialPropertyMappingSelected> list)
|
{
|
if (list == null || list.Count() < 1)
|
return default;
|
return list.Select(x => new Entity.SpecialPropertyMappingSelected() { CorpID=x.CorpID,CatalogID=x.CatalogID,PropertyID=x.PropertyID, Selected = x.Selected }).ToList();
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public static List<Entity.SpecialPropertyValueSetter> ToEntityList(this List<Model.SpecialPropertyValueSetter> list)
|
{
|
if (list == null || list.Count() < 1)
|
return default;
|
return list.Select(x => new Entity.SpecialPropertyValueSetter() { CorpID = x.CorpID, ObjectType = x.ObjectType,ObjectID=x.ObjectID, PropertyID = x.PropertyID,PropertyValue=x.PropertyValue }).ToList();
|
}
|
|
|
|
}
|
}
|