0
我想將位置信息存儲在DocumentDB中,因此使用DocumentDB中的Point類型。我有一個LocationInfo類來映射傳入的發佈請求中的數據。無法在Azure函數中引用GeoSpatial類型點
#r "Newtonsoft.Json"
using Newtonsoft.Json;
using Microsoft.Azure.Documents.Spatial;
public class LocationInfo
{
[JsonProperty(PropertyName = "deviceId")]
public string DeviceId {get; set;}
[JsonProperty(PropertyName = "location")]
public Point Location {get; set;}
[JsonProperty(PropertyName = "activityId")]
public string ActivityId {get; set;}
[JsonProperty(PropertyName = "type")]
public string Type {get; set;}
[JsonProperty(PropertyName = "dateTime")]
public DateTime DateTime {get; set;}
}
我的功能沒有編譯,我得到下面的錯誤。
error CS0234: The type or namespace name 'Documents' does not exist in the namespace 'Microsoft.Azure' (are you missing an assembly reference?)
error CS0246: The type or namespace name 'Point' could not be found (are you missing a using directive or an assembly reference?)
如何在Azure函數中引用using Microsoft.Azure.Documents.Spatial;
。
我確實想過這個,但是認爲project.json被傾銷,所以沒有打擾。無論如何,它的排序,謝謝。 –