hi
this is my sample
when checked multiple item in CheckComboBox
but only one checked item CheckComboBox save to database
how to save All checked items CheckComboBox to database?
thanks
Comments: ** Comment from web user: BoucherS **
this is my sample
when checked multiple item in CheckComboBox
but only one checked item CheckComboBox save to database
how to save All checked items CheckComboBox to database?
thanks
Comments: ** Comment from web user: BoucherS **
Hi,
I don't have access to the Database, but here's a test that could work.
```
private void DoAddNew()
{
Documentdata = Documentdata ?? new Document();
Documentdata.Persons = SelectedItemPersons;
RaisePropertyChanged("Persondata");
RaisePropertyChanged("Documentdata");
}
```
In DocumentMap, I'm not sure about this change :
```
// Relationships
this.HasOptional(t => t.Persons[0])
.WithMany(t => t.Documents)
.HasForeignKey(d => d.PersonID);
```
You could have to modify some stuff to match your needs, but at least, this compiles.
Basically, the Documentdata holds a collection of Person instead of only 1 Person.