Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,6 @@ public static ISpecificationBuilder<T> Skip<T>(
return specificationBuilder;
}

[Obsolete]
public static ISpecificationBuilder<T> Paginate<T>(
this ISpecificationBuilder<T> specificationBuilder,
int skip,
int take)
{
specificationBuilder.Skip(skip);
specificationBuilder.Take(take);

return specificationBuilder;
}

/// <summary>
/// Specify a transform function to apply to the <typeparamref name="T"/> element
/// to produce another <typeparamref name="TResult"/> element.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Ardalis.Specification
{
public class DuplicateSkipException : Exception
{
private const string message = "Duplicate use of the Skip(). Ensure you don't use both Paginate() and Skip() in the same specification!";
private const string message = "Duplicate use of the Skip(). Ensure you don't use Skip() in the same specification!";

public DuplicateSkipException()
: base(message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Ardalis.Specification
{
public class DuplicateTakeException : Exception
{
private const string message = "Duplicate use of Take(). Ensure you don't use both Paginate() and Take() in the same specification!";
private const string message = "Duplicate use of Take(). Ensure you don't use Take() in the same specification!";

public DuplicateTakeException()
: base(message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ public class StoresPaginatedSpec : Specification<Store>
{
public StoresPaginatedSpec(int skip, int take)
{
Query.OrderBy(s => s.Id);
Query.Paginate(skip, take);
Query.OrderBy(s => s.Id)
.Skip(skip)
.Take(take);
}
}
}