Skip to content

Commit

Permalink
Adding Any to IRedisCollecitonInterface (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
slorello89 authored Jan 31, 2022
1 parent 5fd7a77 commit 997c63c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Redis.OM/Searching/IRedisCollection.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Redis.OM.Modeling;

Expand Down Expand Up @@ -54,5 +56,12 @@ public interface IRedisCollection<T> : IOrderedQueryable<T>, IAsyncEnumerable<T>
/// <param name="id">the id to lookup.</param>
/// <returns>the item if it's present.</returns>
T? FindById(string id);

/// <summary>
/// Checks to see if anything matching the expression exists.
/// </summary>
/// <param name="expression">the expression to be matched.</param>
/// <returns>Whether anything matching the expression was found.</returns>
bool Any(Expression<Func<T, bool>> expression);
}
}

0 comments on commit 997c63c

Please sign in to comment.