我正在使用VS2013,.Net 4.5,EF6,MVC5,MSSQL服务器为11.00.2100
当我在模型中创建一个属性时:
public SqlGeography Position { get; set; }
然后使用update-database不会对该模型的数据库表进行任何更改。
我正在从此参考中使用SqlGeography:
Microsoft.SqlServer.Types.SqlGeography
我该如何解决?
您需要使用DbGeography
EF中的类型,然后SqlGeography
由Sql Server提供程序将其转换为EF 。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句