dotnet-dynamic-query/PoweredSoft.DynamicQuery.Core/IQueryHandler.cs
2018-12-06 21:24:03 -06:00

24 lines
682 B
C#

using System;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace PoweredSoft.DynamicQuery.Core
{
public interface IInterceptableQueryHandler
{
void AddInterceptor(IQueryInterceptor interceptor);
}
public interface IQueryHandler : IInterceptableQueryHandler
{
IQueryExecutionResult Execute(IQueryable queryable, IQueryCriteria criteria);
}
public interface IQueryHandlerAsync : IInterceptableQueryHandler
{
Task<IQueryExecutionResult> ExecuteAsync(IQueryable queryable, IQueryCriteria criteria, CancellationToken cancellationToken = default(CancellationToken));
}
}