Skip to content

Commit 997c63c

Browse files
authored
Adding Any to IRedisCollecitonInterface (#58)
1 parent 5fd7a77 commit 997c63c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Redis.OM/Searching/IRedisCollection.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Collections.Generic;
23
using System.Linq;
4+
using System.Linq.Expressions;
35
using System.Threading.Tasks;
46
using Redis.OM.Modeling;
57

@@ -54,5 +56,12 @@ public interface IRedisCollection<T> : IOrderedQueryable<T>, IAsyncEnumerable<T>
5456
/// <param name="id">the id to lookup.</param>
5557
/// <returns>the item if it's present.</returns>
5658
T? FindById(string id);
59+
60+
/// <summary>
61+
/// Checks to see if anything matching the expression exists.
62+
/// </summary>
63+
/// <param name="expression">the expression to be matched.</param>
64+
/// <returns>Whether anything matching the expression was found.</returns>
65+
bool Any(Expression<Func<T, bool>> expression);
5766
}
5867
}

0 commit comments

Comments
 (0)