mirror of
https://github.com/Biarity/Sieve.git
synced 2025-11-07 20:25:18 +01:00
Added static filters
This commit is contained in:
@@ -54,6 +54,13 @@ namespace SieveUnitTests.Services
|
||||
return result;
|
||||
}
|
||||
|
||||
public static IQueryable<IPost> HasInTitleStatic(IQueryable<Post> source, string op, string[] values)
|
||||
{
|
||||
var result = source.Where(p => p.Title.Contains(values[0]));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public IQueryable<IComment> IsNew(IQueryable<IComment> source, string op, string[] values)
|
||||
{
|
||||
var result = source.Where(c => c.DateCreated > DateTimeOffset.UtcNow.AddDays(-2));
|
||||
|
||||
Reference in New Issue
Block a user