我正在将EF Core用于ASP.Net Web API应用程序,并尝试从我的模型中创建PostgreSQL数据库(基本的Microsoft文档,例如)
我设法通过“ Add-Migration创建迁移,但是下一步,当我执行” Update-Database“时,出现此错误:
> fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
> Failed executing DbCommand (15ms) [Parameters=[], CommandType='Text',
> CommandTimeout='30'] CREATE TABLE "Blogs" (
> "BlogId" integer NOT NULL GENERATED BY DEFAULT AS IDENTITY,
> "Url" text NULL,
> CONSTRAINT "PK_Blogs" PRIMARY KEY ("BlogId") );
> Npgsql.PostgresException (0x80004005): 42601: erreur de syntaxe sur ou près de « GENERATED »