SQLite with Entity Framework

后端 未结 6 2047
闹比i
闹比i 2021-01-30 17:36

I\'m having a problem with primary keys in Entity Framework when using SQLite. SQLite wants an explicit NULL in the VALUES list on an autoincrementing primary key column. I ha

6条回答
  •  鱼传尺愫
    2021-01-30 18:32

    It seems EF provider for SQLite does not pick up the column as identity (autoincrement).

    For database first, right click the column in EDMX designer and set the StoreGeneratedPattern to Identity.

提交回复
热议问题