Why use ICollection and not IEnumerable or List<T> 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> ? 回答1: Usually what you choose will depend on which methods you need access to. In general - IEnumerable<> (MSDN: http://msdn.microsoft.com/en-us/library/system.collections.ienumerable.aspx) for a list of objects that only needs to be iterated through,