如何更改查询中的值,例如:
return (from cust in entities.vw_WebCustomer
where cust.CorporationId == token.CorporationId &&
cust.Branch == branch &&
cust.AccountNumber == accountnumber
select new CustomerRequest
{
AccountId = cust.AccountId,
AccountNumber = cust.AccountNumber,
AreaCode = cust.AreaCode,
Branch = cust.Branch,
BudgetBalance = (decimal) cust.BudgetBalance,
BudgetRate = (decimal) cust.BudgetRate,
CareOf = cust.CareOf,
City = cust.City,
CurrentBalance = (decimal) cust.CurrentBalance,
CurrentTankPercentage = (decimal) cust.PercentFull,
};
如果 cust.PercentFull 小于零,我想检查 CurrentTankPercentage 的值是否为零。
我是否必须将其拆开才能对其进行更改?