title: LINQ find closest coordinates
body: <p>I'm having a database full of coordinates (x,y), and i wish to find the coordinates closest to a point.  (there can be multiple closest to this point)</p>
  
  <p>I've written this 2 LINQ's, but there must be a smarte way, than going through the database two times:</p>
  
  <pre><code>var closestDistance = _context.Coordinates.Min(x =&gt;
                            Math.Sqrt(Math.Pow((point.coordX - x.CoordX), 2) +
                                      Math.Pow((point.coordY- x.CoordY), 2)));
  var closest = _context.Coordinates.Where(x=&gt; closestDistance ==
                            Math.Sqrt(Math.Pow((point.coordX - x.CoordX), 2) +
                                      Math.Pow((point.coordY - x.CoordY), 2)));
  </code></pre>
  
  <p>How can i optimize this?</p>