2021-08-13 13:10:15 -04:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Query;
|
2019-11-27 21:08:51 -05:00
|
|
|
|
using PoweredSoft.DynamicQuery.Core;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace PoweredSoft.DynamicQuery.Test
|
|
|
|
|
{
|
|
|
|
|
public partial class GroupInterceptorTests
|
|
|
|
|
{
|
|
|
|
|
public class MockQueryExecutionOptionsInterceptor : IQueryExecutionOptionsInterceptor
|
|
|
|
|
{
|
|
|
|
|
public IQueryExecutionOptions InterceptQueryExecutionOptions(IQueryable queryable, IQueryExecutionOptions current)
|
|
|
|
|
{
|
|
|
|
|
if (queryable.Provider is IAsyncQueryProvider)
|
|
|
|
|
{
|
|
|
|
|
current.GroupByInMemory = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return current;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|