已经发现了对“关系”角色的冲突变化。 [英] Conflicting changes to the role''of the relationship''have been detected.
本文介绍了已经发现了对“关系”角色的冲突变化。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
MVC3 RTM,EF4 CTP5,VS2010
我有一个简单的产品和类别型号
MVC3 RTM, EF4 CTP5, VS2010
I have a simple model of Product and Category
我正在编辑产品并更改CategoryID 。$
在我的控制器编辑方法的保存代码中,我正在执行以下操作:
I am editing a product and changing the CategoryID.
In my save code in my Edit method of my controller I am doing the following:
[HttpPost]
public ActionResult Edit(int ID)
{
Product product = db.Products.Find(ID);
TryUpdateModel<Product>(product);
db.SaveChanges();
return RedirectToAction("Index");
}
推荐答案
<特伦斯,
我无法重现这个问题,你能给我发一个重现问题的项目吗? rowmil'AT'microsoft'DOT'com。
I'm not able to reproduce this issue, would you be able to send me a project that reproduces the problem? rowmil 'AT' microsoft 'DOT' com.
~Rowan
这篇关于已经发现了对“关系”角色的冲突变化。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文