且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从实体框架更新SQL位列

更新时间:2023-02-13 16:17:37

我认为这是因为创建设置对象时,活动字段采用的是默认值:即false。因此,当您将Active设置为false时,没有任何变化。您必须在更新前从Db加载实体。

I think this is because when you create a Setting object .Active field takes is default value: that is false. So when you set Active to false there is no change. You have to load the entity from the Db before the update.