How to change the value of associated field

后端 未结 3 1517
死守一世寂寞
死守一世寂寞 2021-01-05 15:59

I have 2 classes with a LINQ association between them i.e.:

Table1:       Table2:
ID            ID
Name          Description
              ForiegnID
<         


        
3条回答
  •  星月不相逢
    2021-01-05 16:40

    You wanna to associate with another record in table1 or change table1.id? if it's option 1, you need to remove that association and set a new one. If option 2, check you db and see if update cascade yes enabled for this fk and than get record and change value of id.

提交回复
热议问题