You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
566 B
C#

using System;
using System.Collections.Generic;
using HcUtility.Core;
namespace DSWeb.TruckMng.Helper
{
public class ModelObjectConvert<T> where T:ModelObjectBase
{
private static ModelObjectBase Converter(T inputObject)
{
return inputObject;
}
public static List<ModelObjectBase> ToModelObjectList(List<T> objList)
{
if (objList == null)
return null;
return objList.ConvertAll<ModelObjectBase>(new Converter<T, ModelObjectBase>(Converter));
}
}
}