我在数据库中以from_amount
和to_amount
的形式存储了一些范围信息,如下所示,
public List<int> CheckRange(decimal from, decimal to)
{
var rets = new List<int>();
// Check From Amount
if (Entity.amount.Any(x => x.to_amount >= from))
rets.Add(1);
// Check To Amount
if (Entity.amount.Any(x => x.from_amount <= to))
rets.Add(2);
return rets;
}
答案 0 :(得分:1)
使用@if($match->schedule > $match->schedule)
<strong id="match_schedule">Match will start soon</strong>
@endif
方法尝试这种情况:
$ConnectArgs = @{
ConnectionEndpoint = "mycluster:19000";
X509Credential = $True;
StoreLocation = 'CurrentUser';
StoreName = "MY";
FindType = 'FindByThumbprint';
FindValue = "My_thumbprint"
}
Connect-ServiceFabricCluster @ConnectArgs
Get-ServiceFabricApplicationHealth -ApplicationName fabric:/Myapp -ExcludeHealthStatistics
前两个条件确保没有边界在给定范围内,因此当一个范围包含在另一个范围内时,它仅留下一个选项,但是第三个条件检查(显然,条件检查与我说的相反,即为什么一开始就否定)。
注意:您可能想将$health = Get-ServiceFabricApplicationHealth -ApplicationName "fabric:/Myapp"
If ($health.AggregatedHealthState -eq "OK") {
Write-Host "$($clusterApplication)'s health is ok!"
} Else {
Write-Error "$($clusterApplication)'s health is not ok"
}
,Where
运算符更改为.Where(e => !((e.from_amount > from && e.from_amount < to)
|| (e.to_amount > from && e.to_amount < to)
|| (e.from_amount < from && e.to_amount > to)));
和<