Why use ICollection and not IEnumerable or List on many-many/one-many relationships?

I see this a lot in tutorials, with navigation properties as ICollection<T>.

Is this a mandatory requirement for Entity Framework? Can I use IEnumerable?

What’s the main purpose of using ICollection instead of IEnumerable or even List<T>?

9 Answers
9

Leave a Comment