title: LINQ to check boolean value
body: <p>I have a List AffiliateConfigurations</p>
  
  <pre><code>public class AffiliateConfiguration
  {
      public int AffiliateConfigurationId { get; set; }
      public string Name { get; set; }
      public bool IsActive { get; set; }
  }
  </code></pre>
  
  <p>with following Sample Data:</p>
  
  <pre><code>(1,"AddOn",true)
  (2,"DummyEmail",false)
  (3,"ProviderType",true)
  </code></pre>
  
  <p>Basically I want to perform some action, if my List contains any item whose name is equal to ProviderType and its IsActive value contains false.
  I tried this, is this the right approach?</p>
  
  <pre><code>if (AffiliateConfigurations.Any(x =&gt; x.Name.Equals("ProviderType")) &amp;&amp; !AffiliateConfigurations.FirstOrDefault(x =&gt; x.Name.Equals("ProviderType")).IsActive)
   {
      //perform some action
   }
  </code></pre>