Added a smaller and simplier way of getting TV Request info

This commit is contained in:
Jamie Rees 2018-06-21 14:13:15 +01:00
parent 7e7376bbe5
commit a7ccb74ad9
7 changed files with 101 additions and 9 deletions

View file

@ -60,6 +60,24 @@ namespace Ombi.Store.Repository.Requests
.Where(x => x.ChildRequests.Any(a => a.RequestedUserId == userId))
.AsQueryable();
}
public IQueryable<TvRequests> GetLite(string userId)
{
return Db.TvRequests
.Include(x => x.ChildRequests)
.ThenInclude(x => x.RequestedUser)
.Where(x => x.ChildRequests.Any(a => a.RequestedUserId == userId))
.AsQueryable();
}
public IQueryable<TvRequests> GetLite()
{
return Db.TvRequests
.Include(x => x.ChildRequests)
.ThenInclude(x => x.RequestedUser)
.AsQueryable();
}
public IQueryable<ChildRequests> GetChild()
{
return Db.ChildRequests