错误代码 public bool addSubOptionItem(csModel.cs_Answer answers) { bool result = false; wpe = new csWeiPlatformEntities();//实例化entity对象 try { wpe.CreateObjectSet<cs_Answer>().AddObject(answers); wpe.SaveChanges(); result = true; } catch (Exception) { result = false; } //wpe.Detach(answers); return result; }
一个实体对象不能由多个 IEntityChangeTracker 实例引用。
时间: 2025-01-02 04:39:58