📜  c# core linq savechanges invalid column name error when added but not while updates - C#代码示例

📅  最后修改于: 2022-03-11 14:49:20.649000             🧑  作者: Mango

代码示例1
Just to be clear on this answer, because it was most accurate to my situation 
(but I didnt know it until after I figured my problem out). 
  If you have some error related to OtherTable_ID when you are
  retrieving Table, go to your OtherTable model and make sure 
  you don't have an ICollection in there. Without a relationship 
  defined, the framework will auto-assume that you must have a
  FK to OtherTable and create these extra properties in the generated SQL.