title: Format JSON as GeoJson
body: <p>I'm attempting to retrieve some data from my database to use in the GoogleMaps API but I'm not sure how to format it as GeoJson.</p>
  
  <p>Currently, my code look like:</p>
  
  <pre><code>public IActionResult GetAll()
  {
      using (var connection = new SqlConnection(_config.GetConnectionString("MainDatabase")))
      {
          var results = connection.Query(
              @"SELECT    [Car] = car_no,
                          [Latitude] = lat,
                          [Longitude] = lng,
                          [Status] = status
  
                  FROM    dbo.vehicles vh"
          );
  
          return Json(results);
      }
  }
  </code></pre>
  
  <p>However this returns it in a "plain" json format and I need to format it to return in a format similar to this:</p>
  
  <pre><code>{
      "type": "FeatureCollection",
      "features": [{
          "type": "Feature",
          "geometry": {
              "type": "Point",
              "coordinates": [102.0, 0.5]
          },
          "properties": {
              "car": "15",
              "status": "arrived"
          }
      }]
  }
  </code></pre>