dotnet-dynamic-query/PoweredSoft.DynamicQuery/ServiceCollectionExtensions.cs

26 lines
1005 B
C#
Raw Normal View History

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>();
//services.TryAddTransient<IQueryHandlerAsync, QueryHandlerAsync>();
2018-11-23 02:42:53 -05:00
return services;
}
}
}