Пример #1
0
 /// <summary>
 /// ConvertEntity
 /// </summary>
 /// <typeparam name="S">SourceEntity Type</typeparam>
 /// <typeparam name="T">targetEntity Type</typeparam>
 /// <param name="source">SourceEntity</param>
 /// <param name="manualMap">Action<SourceEntity Type,targetEntity Type></param>
 /// <returns>SourceEntity</returns>
 public static T Convert <S, T>(this S source, Action <S, T> manualMap)
     where S : class
     where T : class
 {
     return(EntityConverter <S, T> .Convert(source, manualMap));
 }
Пример #2
0
 public static T DeepCopy <T>(this T t)
 {
     return(EntityConverter <T, T> .Convert(t));
 }
Пример #3
0
 /// <summary>
 /// ConvertEntity
 /// </summary>
 /// <typeparam name="S">SourceEntity Type</typeparam>
 /// <typeparam name="T">targetEntity Type</typeparam>
 /// <param name="source">SourceEntity</param>
 /// <returns>targetEntity</returns>
 public static T Convert <S, T>(this S source)
     where S : class
 {
     return(EntityConverter <S, T> .Convert(source));
 }