不知道为什么asnotracking 不好用。
只能用这个办法了。
var newEntity = context.Entry(oldEntity).CurrentValues.ToObject();
不知道为什么asnotracking 不好用。
只能用这个办法了。
var newEntity = context.Entry(oldEntity).CurrentValues.ToObject();
转载于:https://www.cnblogs.com/SeeSeeCloudIsFar/p/6513598.html