This has to do with the fact that your datacontext (db) cannot track the same entity more than once. See this post for more details on what's going on.
One of the obscure comments at the bottom of that post says to try:
public void Update(Customer customer)
{
NorthwindDataContext context = new NorthwindDataContext();
context.Attach(customer);
context.Refresh(RefreshMode.KeepCurrentValues, customer);
context.SubmitChanges();
}
Let me know how it works out for you, as the OP of that post says it worked out for him...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…