Tl;dr:
Use the most generic types possible for arguments,
Use the most specific types possible for return values
Adhere to the following guideline.
Use IEnumerable for arguments as the most generic type possible.
Use IReadOnlyList for return values as the most specific type possible.
IQueryable is a leaky abstraction because it requires you to know which LINQ expressions the ORM can understand.
IList and Array aren’t suitable because they are mutable.
Keep in mind that some implementations of IEnumerable are also leaky abstractions
https://enterprisecraftsmanship.com/posts/which-collection-interface-to-use/
#design #api