public static IQueryable <ModerationActionEntity> FilterBy(this IQueryable <ModerationActionEntity> query, ModerationActionSearchCriteria criteria) => query .FilterBy( x => x.GuildId == criteria.GuildId, criteria.GuildId != null) .FilterBy(
public static IQueryable <ModerationActionEntity> FilterBy(this IQueryable <ModerationActionEntity> query, ModerationActionSearchCriteria criteria) => query .FilterBy( x => x.GuildId == criteria.GuildId, criteria.GuildId != null) .FilterBy( x => criteria.Types.Contains(x.Type), criteria?.Types?.Any() ?? false) .FilterBy( x => x.Created >= criteria.CreatedRange.Value.From, criteria?.CreatedRange?.From != null) .FilterBy( x => x.Created <= criteria.CreatedRange.Value.To, criteria?.CreatedRange?.To != null) .FilterBy( x => x.CreatedById == criteria.CreatedById, criteria?.CreatedById != null);
public static IQueryable <ModerationActionEntity> FilterBy(this IQueryable <ModerationActionEntity> query, ModerationActionSearchCriteria criteria) => query .FilterBy( x => x.GuildId == criteria.GuildId, criteria.GuildId != null) .FilterBy( x => criteria.Types.Contains(x.Type), criteria?.Types?.Any() ?? false) .FilterBy(