Releases: PoweredSoft/DynamicQuery
Releases · PoweredSoft/DynamicQuery
CaseInsensitive Support
Added CaseInsensitive Support to SimpleFilter this simplifies the search of string fields in queryables that are not being a case insensitive driver.
new SimpleFilter
{
Path = "Name",
Type = FilterType.EndsWith,
Value = "Cables",
CaseInsensitive = true
}
Updated Dependencies
Updated dependencies to DynamicLinq 1.1.11.
QueryInterceptorProvider
You can now return interceptors using a provider.
public class QueryProviderTests
{
private class FakeInterceptor : IQueryInterceptor
{
}
private class QueryInterceptorProvider : IQueryInterceptorProvider
{
public IEnumerable<IQueryInterceptor> GetInterceptors<TSource, TResult>(IQueryCriteria queryCriteria, IQueryable<TSource> queryable)
{
yield return new FakeInterceptor();
yield return new FakeInterceptor();
}
}
[Fact]
public void Simple()
{
MockContextFactory.SeedAndTestContextFor("QueryProviderTests_Simple", TestSeeders.SimpleSeedScenario, ctx =>
{
// criteria
var criteria = new QueryCriteria();
var queryHandler = new QueryHandler(new List<IQueryInterceptorProvider>{
new QueryInterceptorProvider()
});
queryHandler.AddInterceptor(new FakeInterceptor());
var interceptors = queryHandler.ResolveInterceptors<Order, Order>(criteria, ctx.Orders);
Assert.Equal(1, interceptors.Count);
Assert.True(interceptors[0].GetType() == typeof(FakeInterceptor));
});
}
}
Version 2! is now generics! :D
Updated to use PoweredSoft.Data updated services for async operations
1.0.117 will be nuggetting using alm from now on.
Async handler implementation
You can now use IQueryHandlerAsync to execute the query in await/async context 👍
New Async
[HttpPost]
public async Task<IQueryExecutionResult> Read(
[FromServices]YourContext context,
[FromServices]IQueryHandlerAsync handler,
[FromBody]IQueryCriteria criteria)
{
IQueryable<OfSomething> query = context.Somethings;
var result = await handler.ExecuteAsync(query, criteria);
return result;
}
Better Dependency Injection Support
Added some extension methods to start faster :) with DI.
Added some extension methods and a web package for easier start in asp.net core mvc
Added some extension methods and a web package for easier start in asp.net core mvc
Fixed nested group results.
I forgot to nest groups in the result.
Nuget depedencies fixed
Just fixed dependencies to have the right enumerations when installing nuget package.