我有以下简单的代码优先模型
[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.
也没有多大帮助这里是环境。
任何帮助/建议将不胜感激。
答案 0 :(得分:0)
Npgsql EF6 提供程序不支持 JSON - 这确实与 EF6 的类型支持存在问题有关。
EF Core 提供程序确实更好地支持 JSON,see the docs。