try{ 删除或修改 }catch { _DBContext.Refresh(RefreshMode.StoreWins, entity); } 转载于:https://www.cnblogs.com/zcm123/archive/2013/06/02/3113780.html