title: Bing Maps How to check if a point is inside the bounds of the map?
body: <p>My purpose is to get the map boundaries and then to loop over my collection and to check which points are inside the boundaries.</p>
  
  <p>So the first step is getting the map boundaries:</p>
  
  <pre><code>LocationRect bounds = map.Bounds;
  Location northwest = bounds.Northwest;
  Location southeast = bounds.Southeast;
  
  //Here I converts to DbGeography, because my server side works with it.
  DbGeography DbNorthwest = new DbGeography()
  {
      Geography = new DbGeographyWellKnownValue()
      {
          CoordinateSystemId = 4326,
          WellKnownText = GeoLocation.ConvertLocationToPoint(new GeocodeService.Location()
          {
              Latitude = northwest.Latitude,
              Longitude = northwest.Longitude
          })
      }
  };
  
  DbGeography DbSoutheast = new DbGeography()
  {
      Geography = new DbGeographyWellKnownValue()
      {
          CoordinateSystemId = 4326,
          WellKnownText = GeoLocation.ConvertLocationToPoint(new GeocodeService.Location()
          {
              Latitude = southeast.Latitude,
              Longitude = southeast.Longitude
          })
      }
  };
  </code></pre>
  
  <p>And now calls to the method that should return all the objects that there location between those two points:</p>
  
  <pre><code>WcfClient client = new WcfClient();
  var results = await client.GetEventsBetweenLocations(DbNorthwest, DbSoutheast);
  </code></pre>
  
  <p>Now I need to implement this method (which locates on the entity framework):
  I dont know how to do it?</p>
  
  <pre><code>public IQueryable&lt;Event&gt; GetEventsBetweenLocations(DbGeography first, DbGeography second)
  {
      //How to check if the e.GeoLocation (which is DbGeography type) is between the two locations?
      return this.Context.Events.Where(e =&gt; e.GeoLocation ...?);
  }
  </code></pre>
  
  <p>I will be much thankfull if you can help me !!! :)</p>