Exemplo n.º 1
0
 public static IQueryable <EmojiEntity> FilterBy(this IQueryable <EmojiEntity> query, EmojiSearchCriteria criteria)
 => query
 .FilterBy(
Exemplo n.º 2
0
 public static IQueryable <EmojiEntity> FilterBy(this IQueryable <EmojiEntity> query, EmojiSearchCriteria criteria)
 => query
 .FilterBy(
     x => x.GuildId == criteria.GuildId.Value,
     criteria.GuildId != null)
 .FilterBy(
     x => x.ChannelId == criteria.ChannelId.Value,
     criteria.ChannelId != null)
 .FilterBy(
     x => x.MessageId == criteria.MessageId.Value,
     criteria.MessageId != null)
 .FilterBy(
     x => x.UserId == criteria.UserId.Value,
     criteria.UserId != null)
 .FilterBy(
     x => x.EmojiId == criteria.EmojiId.Value,
     criteria.EmojiId != null)
 .FilterBy(
     x => x.EmojiName == criteria.EmojiName,
     criteria.EmojiName != null)
 .FilterBy(
     x => x.IsAnimated == criteria.IsAnimated,
     criteria.IsAnimated != null)
 .FilterBy(
     x => x.Timestamp >= criteria.TimestampRange.Value.From.Value,
     criteria.TimestampRange != null &&
     criteria.TimestampRange.Value.From != null)
 .FilterBy(
     x => x.Timestamp <= criteria.TimestampRange.Value.To.Value,
     criteria.TimestampRange != null &&
     criteria.TimestampRange.Value.To != null)
 .FilterBy(
     x => x.UsageType == criteria.UsageType.Value,
     criteria.UsageType != null);