我試圖在ASP.NET MVC 4中創建一個webapi。使用了實體框架5的webapi空間類型和我寫了一個非常簡單碼。在Azure上找不到'Microsoft.SqlServer.Types'版本10或更高版本
public List<Area> GetAllAreas()
{
List<Area> aList = db.Areas.ToList();
return aList;
}
Area包含DbGeometry。
當我運行這個地方它的工作原理,但是當我發佈到Azure它給了我這個錯誤:
Spatial types and functions are not available for this provider because the assembly 'Microsoft.SqlServer.Types' version 10 or higher could not be found.
任何人都知道如何解決這個問題? :)
謝謝!
是否使用Azure網站或雲服務Web角色固定我的問題?另外,你的數據庫是一個SQL Azure數據庫嗎?您是否嘗試過針對SQL Azure數據庫運行本地代碼,並且這是否正常工作? –