【发布时间】:2017-05-31 07:43:20
【问题描述】:
我有这个问题:
investorData = from investor in db.Investors
join loanapp in db.LoanApplications on investor.FundID equals loanapp.FundID into loanAppData
from lapp in loanAppData.DefaultIfEmpty()
join fundreport in db.FundReportLoanDatas on lapp.LoanId equals fundreport.LoanId into fundReportData
from freport in fundReportData.DefaultIfEmpty()
where investor.FundID == fundID
orderby lapp.LoanId descending
select new InvestorPortfolioVM()
{
InvestorId = investor.InvestorID,
CurrentLTV = freport.CurrentLTV == null ? 0.0 : freport.CurrentLTV,
LoanId = lapp.LoanId,
SegLTV = freport.SegLTV == string.Empty ? "" : freport.SegLTV,
BorrowerName = lapp.BorrowerName,
LoanStatusId = lapp.LoanStatusId
};
我现在想要实现的是按一个字段对项目进行排序,LoanStatusId 以 LoanStatusId 不为 4 或 8 的贷款开头。
知道如何实现吗?
【问题讨论】:
-
您希望 4-8 位于底部无序还是根本不想要?
-
@FilipCordas 在底部谢谢
标签: c# entity-framework linq linq-to-sql linq-to-entities