using System.Collections.Generic; using System.Linq; using OpenHarbor.CQRS.DynamicQuery.Abstractions; using PoweredSoft.DynamicQuery; using PoweredSoft.DynamicQuery.Core; namespace OpenHarbor.CQRS.DynamicQuery.AspNetCore; public class DynamicQuery : DynamicQuery, IDynamicQuery where TSource : class where TDestination : class { } public class DynamicQuery : DynamicQuery, IDynamicQuery where TSource : class where TDestination : class where TParams : class { public TParams Params { get; set; } public TParams GetParams() { return Params; } } public class DynamicQuery : IDynamicQuery { public int? Page { get; set; } public int? PageSize { get; set; } public List Sorts { get; set; } public List Aggregates { get; set; } public List Groups { get; set; } public List Filters { get; set; } public List GetAggregates() { return Aggregates?.Select(t => t.ToAggregate())?.ToList();//.AsEnumerable()?.ToList(); } public List GetFilters() { return Filters?.Select(t => t.ToFilter())?.ToList(); } public List GetGroups() { return this.Groups?.AsEnumerable()?.ToList(); } public int? GetPage() { return this.Page; } public int? GetPageSize() { return this.PageSize; } public List GetSorts() { return this.Sorts?.AsEnumerable()?.ToList(); } }