/// <summary> /// Maps a list of objects. /// </summary> /// <typeparam name="TDestination">The type to map the object.</typeparam> /// <param name="source">The list of objects to map.</param> /// <returns>The list of mapped objects.</returns> public static IEnumerable <TDestination> Map <TDestination>(this IEnumerable <IFWMap> source) where TDestination : class, new() { var mapper = new FWValueInjecterMapper(); return(mapper.Map <TDestination>(source)); }
/// <summary> /// Maps an object to another type. /// </summary> /// <typeparam name="TDestination">The type to map the object.</typeparam> /// <param name="source">The object to map.</param> /// <param name="targetObject">The referece to an existent target object.</param> /// <returns>The mapped object.</returns> public static TDestination Map <TDestination>(this IFWMap source, TDestination targetObject = null) where TDestination : class, new() { var mapper = new FWValueInjecterMapper(); return(mapper.Map(source, targetObject)); }