SQLite with Entity Framework

后端 未结 6 2050
闹比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:12

    From the book, "The Definitive Guide to SQLite" I read the following under primary key constraints:

    "In reality, however, this column will simply be an alias for ROWID. They will all refer to the same value."

    I believe that is the reason for needing to set AUTOINCREMENT in the column definition.

提交回复
热议问题