Error: the entity type requires a primary key

后端 未结 11 1584
走了就别回头了
走了就别回头了 2020-12-02 15:30

I would like to expand the question asked on this thread

Binding listbox to observablecollection

by giving it an ability to persistent the data. The structur

11条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-02 15:47

    None of the answers worked until I removed the HasNoKey() method from the entity. Dont forget to remove this from your data context or the [Key] attribute will not fix anything.

提交回复
热议问题