Example #1
0
        public static IQueryable <TResult> SelectNew <TResult>(this IQueryable <object> source)
            where TResult : class, new()
        {
            var selector = QueryableSelectorBag.GetForQueryableType(source.GetType());

            return(selector.Select <TResult>(source));
        }
Example #2
0
        public static IQueryable <object> SelectFields <TSource>(this IQueryable <TSource> source, IEnumerable <string> fields)
            where TSource : class
        {
            var selector = QueryableSelectorBag.GetForElementType(source);

            return(selector.SelectFields(source, fields));
        }