ForeignKeyReferenceAlreadyHasValueException and Combobox
In *.xaml file i've defined a combobox: <ComboBox
Name="comboBox"
DisplayMemberPath="Name"
SelectedValuePath="DepartamentID"
SelectedValue="{Binding DepartamentID}"
IsSynchronizedWithCurrentItem="True"
/>
I have binding a one table entity to comboBox's parent, and to get comboBox items source i use this: comboBox.ItemsSource = db.Departaments.ToList<Departament>(). ComboBox content loads fine and selected element also is correct, but, when I try to choose another item from comboBox, I'm getting ForeignKeyReferenceAlreadyHasValueException. What I should do in this situation?

