mirror of
https://github.com/sphildreth/roadie
synced 2025-02-16 21:18:26 +00:00
Collection view work
This commit is contained in:
parent
e59a3195a8
commit
b42070630a
1 changed files with 9 additions and 1 deletions
|
@ -247,7 +247,14 @@ namespace Roadie.Api.Services
|
|||
{
|
||||
result = result.Where(x => x.Rating.HasValue && x.Rating.Value >= request.FilterMinimumRating.Value);
|
||||
}
|
||||
rows = result.OrderBy(sortBy).Skip(request.SkipValue).Take(request.LimitValue).ToArray();
|
||||
if (request.FilterToCollectionId.HasValue)
|
||||
{
|
||||
rows = result.ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
rows = result.OrderBy(sortBy).Skip(request.SkipValue).Take(request.LimitValue).ToArray();
|
||||
}
|
||||
}
|
||||
if (rows.Any())
|
||||
{
|
||||
|
@ -277,6 +284,7 @@ namespace Roadie.Api.Services
|
|||
// Get and number the releases found for the Collection
|
||||
var collectionReleases = (from c in this.DbContext.Collections
|
||||
join cr in this.DbContext.CollectionReleases on c.Id equals cr.CollectionId
|
||||
where c.RoadieId == request.FilterToCollectionId
|
||||
where collectionReleaseIds.Contains(cr.ReleaseId)
|
||||
orderby cr.ListNumber
|
||||
select cr);
|
||||
|
|
Loading…
Add table
Reference in a new issue