title: How to post DbGeography param to MVC?
body: <p>I am trying to expose an API that will allow users to post polygons to persist on the server. I am using ASP.NET MVC 5. How do I format the AJAX parameters correctly to post the request for DbGeography? This is what I am trying:</p>
  
  <pre><code>$.ajax({
      url: '/api/map',
      type: 'POST',
      data: {
          Title: 'My Title',
          MyGEOG: {
              WellKnownText: 'POLYGON ((30 10, 10 20, 20 40, 40 40, 30 10))'
          }
      }
  });
  </code></pre>
  
  <p>This is how my MVC action signature looks like:</p>
  
  <pre><code>    [HttpPost]
      [Route("map")]
      public JsonResult Post(MyShape newShape) {...}
  </code></pre>
  
  <p>Also my <code>MyShape</code> class:</p>
  
  <pre><code>public class MapShape
  {
      public string Title { get; set; }
      public System.Data.Entity.Spatial.DbGeography MyGEOG { get; set; }
  }
  </code></pre>
  
  <p>When putting a breakpoint in the action, <code>newShape.Title</code> does show as <code>My Title</code>, but <code>MyGEOG</code> is null when the AJAX post happens. What is the correct format of the parameter to post correctly as a <code>DbGeography</code> type?</p>