标签: c# sql sql-server-2008 entity-framework entity-framework-4.1
我想从中加载一个实体并只设置一个属性并在Db中更新它,但只能更新我已更改的属性。
我怎样才能做到这一点?
var goodFood = Repository.FoodRepository.GetByID(100); good.Food.SaltLevel = Salt.NoSalt; // Now how to SAve it back without touching any other fields //and only updating the SaltLevel field?