Walaa wrote:
If you need the IsHidden field for databinding, you can just access a related fetched (prefetched) entity in databinding.
okay, thats what i was trying to do... but i just would like to confirm that the correct approach to associating Questions to Evidence is the following: instantiate collections of Questions, bind them to a list or grid (where i may select them), and then in my code behind iterate thru the list of Questions to create EvidenceQuestion entities (my intermediate entity) to add to the Evidence.EvidenceQuestions collection. Then i can add an IsHidden check box (not bound to the data) and set that property of the EvidenceQuestion on save.
The problem with this approach is that i would also like to be able to retrieve the Questions currently associated with an Evidence and bind their EvidenceQuestion.IsHidden property to a check box, then use this list as a starting point for modification of the curent Evidence.EvidenceQuestions collection.
This leads to the other approach i can think of, which would be to instantiate a list of EvidenceQuestions (belonging to the Evidence), and then save any changes to them and add any new ones based on availabel Questions.
Which is the pattern you guys would recommend?
(thanks for your helpful replies, by the way!)