SQLite with Entity Framework

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

    You must set autoincrement to True. You can make this directly from VS by clicking ( Manage Indexes and Keys ) icon from the tool bar while you are in design table window, then update your Model.

    image

提交回复
热议问题