public static TDestination MapObject(TSource entity) { TDestination dentity = EntityAssembler <TSource, TDestination> .MapObject(entity); dentity.SetResponse(entity.Response); return(dentity); }
public static List <TDestination> MapList(List <TSource> entities) { List <TDestination> dentityList = new List <TDestination>(); foreach (var entity in entities) { TDestination dentity = EntityAssembler <TSource, TDestination> .MapObject(entity); dentity.SetResponse(entity.Response); dentityList.Add(dentity); } return(dentityList); }
public static void MapObject(TSource entity, TDestination destination) { EntityAssembler <TSource, TDestination> .MapObject(entity, destination); destination.SetResponse(entity.Response); }