System.Collections.Generic.IEnumerable does not contain any definition for ToList
You might be getting this error when trying to convert the Enumerable to List using ToList. It means the namespace to import the LINQ has been missed in your class.
Error:
'System.Collections.Generic.IEnumerable' does not contain any
definition for 'ToList'
Solution:
Add the namespace - System.Linq
using System.Linq;
Leave a comment