Fixed a load of bugs need to figure out what is wrong with tv requests #865

This commit is contained in:
tidusjar 2017-06-26 22:30:33 +01:00
parent 2bc916998c
commit 386f856ea7
7 changed files with 66 additions and 32 deletions

View file

@ -18,27 +18,30 @@ namespace Ombi.Store.Repository.Requests
public async Task<TvRequests> GetRequest(int tvDbId)
{
return await Db.TvRequests.Where(x => x.TvDbId == tvDbId)
.Include(x => x.ChildRequests)
.ThenInclude(x => x.Issues)
.Include(x => x.ChildRequests)
.ThenInclude(x => x.RequestedUser)
.Include(x => x.ChildRequests)
.ThenInclude(x => x.SeasonRequests)
.ThenInclude(x => x.Episodes)
.FirstOrDefaultAsync();
}
public IQueryable<TvRequests> Get()
{
return Db.TvRequests
.Include(x => x.ChildRequests)
.ThenInclude(x => x.Issues)
.Include(x => x.ChildRequests)
.ThenInclude(x => x.RequestedUser)
.Include(x => x.ChildRequests)
.ThenInclude(x => x.SeasonRequests)
.ThenInclude(x => x.Episodes)
.AsQueryable();
}
public IQueryable<ChildRequests> GetChild()
{
return Db.ChildRequests
.Include(x => x.Issues)
.Include(x => x.RequestedUser)
.Include(x => x.SeasonRequests)
.ThenInclude(x => x.Episodes)
.AsQueryable();
}