コード例 #1
0
 public static IQueryable <ModerationActionEntity> FilterBy(this IQueryable <ModerationActionEntity> query, ModerationActionSearchCriteria criteria)
 => query
 .FilterBy(
     x => x.GuildId == criteria.GuildId,
     criteria.GuildId != null)
 .FilterBy(
コード例 #2
0
 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);
コード例 #3
0
 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(