title: C# ef core efficiently determine if there is only one row in a query
body: <p>What is the most efficient way to check if a particular query has one row AND only one row?
  .FirstOrDefault() will not serve my purpose because I am interested in knowing if there are two+ or just one result.</p>
  <p>is it</p>
  <ol>
  <li>via count async</li>
  </ol>
  <pre><code>var record = await _FilteredContext.Context.Where(x =&gt; x.Criterion == FilterCondition).CountAsync();
  var singular = record == 1;
  </code></pre>
  <ol start="2">
  <li></li>
  </ol>
  <pre><code>var singular = false;
  try
  {
   var record = await _FilteredContext.Context.SingleOrDefault(x =&gt; x.Criterion == 
   FilterCondition);
   singular = true;
  }
  catch (Exception ex) {}
  </code></pre>
  <p>or something else entirely?</p>