public static IQueryable <TTarget> Map <TSource, TTarget>(this IQueryable <TSource> source, ObjectMapper <TSource, TTarget> mapper) where TSource : class where TTarget : class, new() { _ = mapper ?? throw new ArgumentNullException(nameof(mapper)); return(source?.Select(mapper.BuildExpression())); }