Meh*_*hdi 3 c# spatial entity-framework-core .net-core
EF core 中的 DbGeography 相当于什么?
我想将以下代码从 EF 转换为 EF Core:
using System.Data.Entity.Spatial;
namespace Domain
{
public class City
{
public int CityId { get; set; }
public DbGeography Coordinates { get; set; }
}
}
Run Code Online (Sandbox Code Playgroud)
您必须NetTopologySuite与 EF Core 一起使用,并且有一个库列表可以为特定数据提供程序启用该功能: https: //learn.microsoft.com/en-us/ef/core/modeling/spatial
| 归档时间: |
|
| 查看次数: |
3944 次 |
| 最近记录: |