2018-11-23 02:42:53 -05:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
|
|
|
|
using PoweredSoft.DynamicQuery.Core;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace PoweredSoft.DynamicQuery
|
|
|
|
|
{
|
|
|
|
|
public static class ServiceCollectionExtensions
|
|
|
|
|
{
|
|
|
|
|
public static IServiceCollection AddPoweredSoftDynamicQuery(this IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
|
services.TryAddTransient<ISort, Sort>();
|
|
|
|
|
services.TryAddTransient<IAggregate, Aggregate>();
|
|
|
|
|
services.TryAddTransient<ISimpleFilter, SimpleFilter>();
|
|
|
|
|
services.TryAddTransient<ICompositeFilter, CompositeFilter>();
|
|
|
|
|
services.TryAddTransient<IGroup, Group>();
|
|
|
|
|
services.TryAddTransient<IQueryCriteria, QueryCriteria>();
|
|
|
|
|
services.TryAddTransient<IQueryHandler, QueryHandler>();
|
2018-12-06 22:24:03 -05:00
|
|
|
|
services.TryAddTransient<IQueryHandlerAsync, QueryHandlerAsync>();
|
2018-11-23 02:42:53 -05:00
|
|
|
|
return services;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|