title: Effective Validation with Linq + System.Data.Entity
body: <p>I'm working on a Discord.Net project and i'm trying to figure out a way of logging more effectively, as the way i'm doing it, feels a bit over the top!</p>
  
  <p>Two examples of ways i'm thinking of doing it:</p>
  
  <pre><code>        var channel = new Channel();
          try
          {
              channel = database.Channels.Where(
                  c =&gt; c.ChannelId == channelId)
                  .Include(c =&gt; c.Server).Single();
          }
          catch(Exception exception)
          {
              Logger.Log(LogSeverity.Error, 
                   $"{ClassName}/{MethodName} - {exception.Message}");
              return;
          }
  </code></pre>
  
  <p>And...</p>
  
  <pre><code>        var channel = database.Channels.Where(
              c =&gt; c.ChannelId == channelId)
              .Include(c =&gt; c.Server).ToList();
  
          if(channel.Count == 0)
          {
              Logger.Log(LogSeverity.Error, 
                  "No channel found when attemtping to log a message.");
              return;
          }
          if(channel.Count &gt; 1)
          {
              Logger.Log(LogSeverity.Critical, 
                  "Multiple channels found when attemtping to log a message");
              return;
          }
  </code></pre>
  
  <p>I would really appreciate any tips and advise on this sort of thing :D </p>