title: Best way to send location data to Azure Mobile Services using a .NET Backend
body: <p>I'm new to Azure Mobile Services, and Entity Framework. So my apologies if this is a rather newbie question... but I've spent a few hours thinking about it without coming to a good conclusion.</p>
  
  <p>I want to store some location data in a <code>DbGeography</code> class in my SQL Database. I've created the code, using code-first migration in C#. Below is the entire class</p>
  
  <pre><code>public class Place : EntityData
  {
      public string Id { get; set; }
      public string Name{ get; set; }
      public DbGeography Coordinates{ get; set; }
  }
  </code></pre>
  
  <p>So the server side code is complete, along with the "standard" controller.</p>
  
  <p>However, it is getting my location data to this <code>DbGeography</code> object I am struggling with. This is my current client side class:</p>
  
  <pre><code>public class Place 
  {
      public string Id { get; set; }
  
      [JsonProperty(PropertyName = "text")]
      public string Name { get; set; }
      [JsonProperty(PropertyName = "location")]
      public string Coordinates { get; set; }
  }
  </code></pre>
  
  <p>To me, it wouldn't make sense to use a <code>DbGeography</code> object on the client side... as it doesn't interact with the database. Therefore I would either like to use a complex type, such as <code>Point</code> or a primative such as <code>string</code> and then "convert" this information on the server side. Probably in the controller.</p>
  
  <p>My question is, how would I go about doing this? Or is my thought process completely wrong in terms of how I am using Azure Mobile Services?</p>
  
  <p>Thanks.</p>
  
  <p>Danny</p>