Example #1
0
 /// <summary>
 /// 批量转换
 /// </summary>
 /// <typeparam name="TSource">源类型</typeparam>
 /// <typeparam name="TTarget">目标类型</typeparam>
 /// <param name="source">源对象集合</param>
 /// <returns>转换结果</returns>
 public static IEnumerable <TTarget> Map <TSource, TTarget>(IEnumerable <TSource> source)
 {
     return(MapperUtil.Map <TSource, TTarget>(source));
 }
Example #2
0
 /// <summary>
 /// 转换对象
 /// </summary>
 /// <typeparam name="TSource">源类型</typeparam>
 /// <typeparam name="TTarget">目标类型</typeparam>
 /// <param name="source">源对象</param>
 /// <param name="target">目标对象</param>
 /// <returns>返回转换结果</returns>
 public static TTarget Map <TSource, TTarget>(TSource source, TTarget target = default)
 {
     return(MapperUtil.Map <TSource, TTarget>(source, target));
 }