I have an entity collection tied to another entity (navigation property) I will always have one but for some reason it brings it back as a collection. I need to be able to change one property on this object, the DateViewed property.
var test = _personDetail.CurrentPerson.RecentlyViewed;
is there a way to use this new test object in a lambda expression to change the DateViewed property to DateTime.Now
Note, I am not 100% certain what you are asking – ie which part comes back as collection, and what
RecentlyViewedis (did you meanDateViewedas you mention elsewhere? Taking a guess here – let me know if this isn’t what you meant.If you know there will always be one and only one item in the
CurrentPersoncollection, you can useSingle()– ie: