为了账号安全,请及时绑定邮箱和手机立即绑定

C# 中的linQ to SQL中的更新数据库中的值问题

C# 中的linQ to SQL中的更新数据库中的值问题

跃然一笑 2018-11-13 10:06:53
错误原因:不能添加其键已在使用中的实体。Customers是实体类 DataClasses1DataContext dd = new DataClasses1DataContext();   public static void UpdateRecord(Customers localTable)        {            try            { dd.Customers.Attach(localTable); dd.Refresh(RefreshMode.KeepCurrentValues, localTable); dd.SubmitChanges(ConflictMode.FailOnFirstConflict );}不能添加其键已在使用中的实体。请问怎么?
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 893 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信