Skip to content

Commit c100ae0

Browse files
committed
I am re thinking this approach but until a re factor is complete, we need to maintain support.
1 parent ad13089 commit c100ae0

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

SubSonic/Linq/Extensions/SubSonicQueryable/EnumerableExtensions.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ namespace SubSonic.Linq
99
/// <summary>
1010
/// Extension Method Forwarding to avoid name conflicts
1111
/// </summary>
12+
/// <remarks>
13+
/// I have had some time to think about this and this approach is valid, but may not be the rabbit hole I am looking for.
14+
/// I believe a better approach would be to map Iqueryable Extension methods in the Query Provider and SubSonicQueryable should only have the SubSonic Only Query Extensions.
15+
/// </remarks>
1216
public static partial class SubSonicQueryable
1317
{
1418
public static IEnumerable<TSource> ForEach<TSource>(this IEnumerable<TSource> source, Action<TSource> action)
@@ -70,6 +74,16 @@ public static bool Any<TSource>(this IEnumerable<TSource> source, Func<TSource,
7074
return Enumerable.Any(source, predicate);
7175
}
7276

77+
public static IEnumerable<TSource> Skip<TSource>(this IEnumerable<TSource> source, int count)
78+
{
79+
return Enumerable.Skip(source, count);
80+
}
81+
82+
public static IEnumerable<TSource> Take<TSource>(this IEnumerable<TSource> source, int count)
83+
{
84+
return Enumerable.Take(source, count);
85+
}
86+
7387
public static IEnumerable<TResult> Select<TResult>(this IEnumerable source, Func<object, TResult> selector)
7488
{
7589
if (source is null)

SubSonic/Linq/Extensions/SubSonicQueryable/QueryableExtensions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ public static IQueryable<TSource> Distinct<TSource>(this IQueryable<TSource> sou
7171
return Queryable.Distinct(source);
7272
}
7373

74+
public static IQueryable<TSource> Skip<TSource>(this IQueryable<TSource> source, int count)
75+
{
76+
return Queryable.Skip(source, count);
77+
}
78+
7479
public static IQueryable<TSource> Take<TSource>(this IQueryable<TSource> source, int count)
7580
{
7681
if (source.IsNotNull() && source.IsSubSonicQuerable())

0 commit comments

Comments
 (0)