title: Spatial data methods in LINQ
body: <p>I'm trying to use distance as a parameter in a c# linq query. The following where clause returns an error of "STGeomFromText doesn't exist in this context":</p>
  
  <pre><code>query = from i in _db.ILV
      join p in _db.PC on
      i.PostCode equals p.PostCode
      where (!string.IsNullOrEmpty(rng)) ? STGeomFromText(i.Point).STDistance(q.Point) &lt;= rng : true
  </code></pre>
  
  <p>using System.Spatial has been declared. Can anyone show me the right way to do this?</p>