public static T FirstOrDefault <T>(this IQueryable <T> source, QueryInfo queryInfo)
     where T : class, new()
 {
     return(source.FirstOrDefault(
                FilterInfo.Parse(queryInfo?.Filter),
                OrderInfo.Parse(queryInfo?.OrderBy),
                SelectInfo.Parse(queryInfo?.Select)));
 }
 public static List <T> ListAll <T>(this IQueryable <T> source, QueryInfo queryInfo)
     where T : class, new()
 {
     return(source.ListAll(
                FilterInfo.Parse(queryInfo?.Filter),
                OrderInfo.Parse(queryInfo?.OrderBy),
                SelectInfo.Parse(queryInfo?.Select)));
 }
 public static LimitList <T> ListLimit <T>(this IQueryable <T> source, LimitQueryInfo queryInfo)
     where T : class, new()
 {
     _ = queryInfo ?? throw new ArgumentNullException(nameof(queryInfo));
     return(source.ListLimit(
                FilterInfo.Parse(queryInfo?.Filter),
                OrderInfo.Parse(queryInfo?.OrderBy),
                SelectInfo.Parse(queryInfo?.Select),
                queryInfo));
 }
 public static List <TTarget> ListAll <TSource, TTarget>(this IQueryable <TSource> source, QueryInfo queryInfo, ObjectMapper <TSource, TTarget> mapper)
     where TSource : class
     where TTarget : class, new()
 {
     return(source.ListAll(
                FilterInfo.Parse(queryInfo?.Filter),
                OrderInfo.Parse(queryInfo?.OrderBy),
                SelectInfo.Parse(queryInfo?.Select),
                mapper));
 }