Postgresql 代码首先无法使用 Postgres 13 映射 JSON 数据类型
Npgsql code first cannot map JSON datatype with Postgres13
我有以下简单的代码优先模型
[Key]
public string LicenceNumber { get; set; }
public int? Year { get; set; }
[Column(TypeName = "json")] // problem here.
public string ModelList { get; set; }
然后我尝试在VS2019 PM控制台创建迁移文件
PM> add-migration db1
并且在 PM 控制台中收到错误消息,根本没有创建任何迁移文件。
The store type 'json' could not be found in the Npgsql provider manifest
我进行了搜索,但它并没有多大帮助,甚至开发人员说 some datatype may not get well support from EF6.
这里是环境
- Entityframework6.4
- Npgsql 4.1.3
- Postgres 13
- Windows10、VS2019
任何 help/advice 将不胜感激。
Npgsql EF6 提供程序不支持 JSON - 这确实与 EF6 的类型支持有问题有关。
EF Core 提供程序确实支持 JSON 好得多,see the docs。
我有以下简单的代码优先模型
[Key]
public string LicenceNumber { get; set; }
public int? Year { get; set; }
[Column(TypeName = "json")] // problem here.
public string ModelList { get; set; }
然后我尝试在VS2019 PM控制台创建迁移文件
PM> add-migration db1
并且在 PM 控制台中收到错误消息,根本没有创建任何迁移文件。
The store type 'json' could not be found in the Npgsql provider manifest
我进行了搜索,但它并没有多大帮助,甚至开发人员说 some datatype may not get well support from EF6.
这里是环境
- Entityframework6.4
- Npgsql 4.1.3
- Postgres 13
- Windows10、VS2019
任何 help/advice 将不胜感激。
Npgsql EF6 提供程序不支持 JSON - 这确实与 EF6 的类型支持有问题有关。
EF Core 提供程序确实支持 JSON 好得多,see the docs。