This is an error that was driving me crazy while I was trying to get a recursive LINQ call to work; the fix is ridiculously simple and just an oversight
First you have to understand that IEnumberable has both generic and not-generic usage. That was my problem. In my code, I included the using System.Collections; namespace and in my code I was doing the following:
IEnumerable <test_order> orders = db.getOrdersByCustomer(1);
Where test_order was type produced with a Linq to Sql Class and getOrdersByCustomer was a Stored Procedure.
I kept getting the error:
The non-generic type 'System.Collections.IEnumerable' cannot be used with type arguments
Which basically told me my problem, but I was too blind to see it at first. Since I was just calling the System.Collections.IEnumerable, and not the System.Collections.Generic.IEnumerable, I was not allowing the use of generics; hence the error. Simple add the following to you code and you will not have this error any longer: