Multiplicity constraint violated. DB first EF 4.1
问题 I have the following model: the i run the following to add a new user: using (var context = new CamelotDB()) { Console.WriteLine("Creating Test User"); DomainEntity userToAdd = new DomainEntity() { EntityName = "Test User", EntityType = DomainEntity.eEntityType.User, EntityCreationDate = DateTime.Now, EntityLastUpdateDate = DateTime.Now, EntityCreatorUserID = 0, Creator = context.DomainEntities.Find(0), EntityUpdaterUserID = 0, Updater = context.DomainEntities.Find(0), EntityParentID = null,