I'm using VS2013, .Net 4.5, EF6, MVC5 and the MSSQL server is 11.00.2100
When I create a property in my model called:
public SqlGeography Position { get; set; }
and then use update-database no changes are made to the database table of that model.
I'm using SqlGeography from this reference:
Microsoft.SqlServer.Types.SqlGeography
How can I solve this?
您需要使用EF中的DbGeography
类型,然后由Sql Server提供程序将其转换为SqlGeography
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.