mirror of
https://github.com/Biarity/Sieve.git
synced 2025-07-27 04:33:23 +02:00
Allow Filters on different sources to share the same name
Allows Posts and Comments to both use the IsNew filter with their own implementations.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Sieve.Services;
|
||||
using SieveUnitTests.Entities;
|
||||
|
||||
@@ -13,6 +14,13 @@ namespace SieveUnitTests.Services
|
||||
return result;
|
||||
}
|
||||
|
||||
public IQueryable<Comment> IsNew(IQueryable<Comment> source, string op, string value)
|
||||
{
|
||||
var result = source.Where(c => c.DateCreated > DateTimeOffset.UtcNow.AddDays(-2));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public IQueryable<Comment> TestComment(IQueryable<Comment> source, string op, string value)
|
||||
{
|
||||
return source;
|
||||
|
Reference in New Issue
Block a user