I\'m trying to load related entities of a SingleOrDefault entity, but I am getting the following exception:
The navigation property of type IEnumerable is not a sing
IEnumerable<T>
is not supported as a type for a navigation collection. You must use ICollection<T>
or another interface derived from it (for example IList<T>
) or a concrete implementation of ICollection<T>
- like List<T>
, HashSet<T>
, etc.
That's because you need ICollection instead of IEnumerable.