tags:

views:

117

answers:

1

How do I assign to an entity's related objects in a simple way?

properties=IList<property>

linq Entities: People

People.Properties

To assign properties list to People.Properties, some properties may be new and others may already exist. How do I assign each property to the People.Property in a simple way?

+1  A: 

As long as your Property class is comparable using the default equality comparer, you should be able to take the set union and assign it to the properties collection.

People.Properties = People.Properties.Union( properties );
tvanfosson