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: md110 **
hi
because i am using Entity Framework and database in this project
example :
```
public ObservableCollection<Person> PersonListCollection
{
get
{
context.Persons.Load();
return context.Persons.Local;
}
}
```
when call "context.Persons.Load();" exception Error in DocumentMap class
// Relationships
this.HasOptional(t => t.Persons[0])
.WithMany(t => t.Documents)
.HasForeignKey(d => d.PersonID);
Error is:
```
The expression 't => t.Persons.get_Item(0)' is not a valid property expression. The expression should represent a property: C#: 't => t.MyProperty' VB.Net: 'Function(t) t.MyProperty
```
Do you use DataBase? or use context.Persons.Load(); in PersonListCollection?
you've use
```
public ObservableCollection<Person> PersonListCollection
{
get
{
// context.Persons.Load();
//return context.Persons.Local;
return m_personList;
}
}
```
you are comment this line: // context.Persons.Load(); and Disabled ef
For this reason, work for you
if use context.Persons.Load();
To give you an error