Resharper警告代码启发式无法访问

Lif*_*fPi 2 c# resharper

我有下面的代码,并想知道为什么其他部分是resharper无法访问.

private bool SomeMEthod(some parameter)
{
    bool status = false; 
    var someCollection = _entity.CustomerPaymentStatus.Where(record => record.CustomerPaymentId == paymentId && record.CurrentRecord == true);
    if (someCollection != null)
    {
        var receivedPayment = someCollection.FirstOrDefault();
        /*some code to save data into DB*/
        status = true;
    }
    else
    {
        //Some code here to log failure scenario

        //here Resharper giving me warning
        //code is heuristically unreachable
    }
    return status;
}
Run Code Online (Sandbox Code Playgroud)

我检查了几个帖子,但不清楚像Code是启发式无法访问

请任何想法.

kni*_*ttl 5

.Where()永远不会返回null,但总是返回一个IEnumerable<T>(或IQueryable<T>.可枚举的可能有0个项目,但它仍然是一个非null的可枚举项.