我正在尝试在 ASP.NET MVC 4 中创建一个 webapi。该 webapi 使用 Entity Framework 5 空间类型,并且我编写了一个非常简单的代码。
public List<Area> GetAllAreas()
{
List<Area> aList = db.Areas.ToList();
return aList;
}
区域包含 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.
有人知道如何解决这个问题吗? :)
谢谢!
最佳答案
我找到了解决办法!只需安装 nuget 包 Microsoft.SqlServer.Types
PM> Install-Package Microsoft.SqlServer.Types
关于asp.net-mvc - 在 Azure 上找不到“Microsoft.SqlServer.Types”版本 10 或更高版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13174197/