Problem with SaveChanges() Entity Framework 4.1
问题 I am having problem with saving the changes to database. I am updating the model A in my controller, however when I save the changes using SaveChanges() I end up having a duplicated item in database for B. After the UpdateModel() is called I inspected the Bs property and it was as I expected however right after the SaveChanges() is called if I inspect the Bs property I will see that the Id is completely different (new Id and new entry). My class is similar to this: public class A {