Metadata Fixes (#3533)
Co-authored-by: Midhun Sudhir <60651970+midhun3301@users.noreply.github.com>
This commit is contained in:
parent
40bbdcb5f0
commit
bb9621a588
25 changed files with 151 additions and 56 deletions
|
@ -288,11 +288,15 @@ public static class QueryableExtensions
|
|||
return stateOption switch
|
||||
{
|
||||
MatchStateOption.All => query,
|
||||
MatchStateOption.Matched => query.Where(s => s.ExternalSeriesMetadata != null && s.ExternalSeriesMetadata.ValidUntilUtc > DateTime.MinValue && !s.IsBlacklisted),
|
||||
MatchStateOption.NotMatched => query.Where(s => (s.ExternalSeriesMetadata == null || s.ExternalSeriesMetadata.ValidUntilUtc == DateTime.MinValue) && !s.IsBlacklisted),
|
||||
MatchStateOption.Matched => query
|
||||
.Include(s => s.ExternalSeriesMetadata)
|
||||
.Where(s => s.ExternalSeriesMetadata != null && s.ExternalSeriesMetadata.ValidUntilUtc > DateTime.MinValue && !s.IsBlacklisted),
|
||||
MatchStateOption.NotMatched => query.
|
||||
Include(s => s.ExternalSeriesMetadata)
|
||||
.Where(s => (s.ExternalSeriesMetadata == null || s.ExternalSeriesMetadata.ValidUntilUtc == DateTime.MinValue) && !s.IsBlacklisted),
|
||||
MatchStateOption.Error => query.Where(s => s.IsBlacklisted),
|
||||
MatchStateOption.DontMatch => query.Where(s => s.DontMatch),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(stateOption), stateOption, null)
|
||||
_ => query
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue