Adding
This commit is contained in:
+37
@@ -0,0 +1,37 @@
|
||||
using System.Linq;
|
||||
using LCU.Shared.Collections.RepoApiLib.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace LCU.Shared.Collections.RepoApiLib.Extensions
|
||||
{
|
||||
public static class QueryableIncludeAll
|
||||
{
|
||||
public static IQueryable<RepoAccount> IncludeAll(this IQueryable<RepoAccount> queryable)
|
||||
{
|
||||
return queryable
|
||||
.Include(repo => repo.Borrowers)
|
||||
.Include(repo => repo.Collaterals)
|
||||
.ThenInclude(collateral => collateral.RepoCompanySelections)
|
||||
.Include(repo => repo.RepoStatusChanges)
|
||||
.Include(repo => repo.RefundStatus)
|
||||
.Include(repo => repo.SixtyPlusCollector)
|
||||
;
|
||||
}
|
||||
|
||||
public static IQueryable<AuctionAssignment> IncludeAll(this IQueryable<AuctionAssignment> queryable)
|
||||
{
|
||||
return queryable
|
||||
.Include(auctionAssignment => auctionAssignment.Auction)
|
||||
.Include(auctionAssignment => auctionAssignment.AutoIMS)
|
||||
.Include(auctionAssignment => auctionAssignment.FloorPriceValuesUsed)
|
||||
.ThenInclude(fpvu => fpvu.CollateralValuation)
|
||||
.Include(auctionAssignment => auctionAssignment.AuctionAssignmentToCollaterals)
|
||||
.ThenInclude(aa2c => aa2c.Collateral);
|
||||
}
|
||||
|
||||
public static IQueryable<Collateral> IncludeAll(this IQueryable<Collateral> queryable)
|
||||
{
|
||||
return queryable.Include(collateral => collateral.RepoCompanySelections);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user