title: Returning a single value with Linq to SQL
body: <p>I'm learning Linq to SQL and I'm having trouble grasping it.  I'm trying to simply return a single (boolean) value in C# with a Linq query.</p>
  
  <p>I want to see if the owner of a story would like an email notification sent when new comments are added.  I would like the method that contains the Linq to SQL to return a boolean value.</p>
  
  <pre><code> public bool NotifyOnComment(string username){
          var notify = (from s in db.AccountSettings
                        where s.UserName == username
                        select s.NotifyOnComment).DefaultIfEmpty(false);
  
          // clueless
      }
  </code></pre>
  
  <p><strong>Update:</strong></p>
  
  <p>I'm doing the following now:</p>
  
  <pre><code>var notify = (from s in db.AccountSettings
                        where s.UserName == username
                        select s.NotifyOnComment).SingleOrDefault();
  
          return (bool)notify;
  </code></pre>