title: Refactor query in LINQ
body: <p>I have a query that needs to check the value from object list if it exists by loop through the value of the main object. How can recode below?</p>
  
  <pre><code>foreach (var kd in dto.KeyDriverModels)
  {
    var keyDriverModelNodeValue = result.SingleOrDefault(x =&gt; x.KeyDriverModelId == kd.ID);
    kd.SelectionStatus = keyDriverModelNodeValue != null ? 
                           keyDriverModelNodeValue.SelectionStatus : string.Empty;
  }
  </code></pre>