I was calling the LINQ function SingleOrDefault, from code copied elsewhere on objects of the exact same type, so was baffled to recieve this message:
(ObjectType) does not contain a definition for 'SingleOrDefault'
A little googling revealed that all i had to do was make a reference to the System.Linq DLL for the class using the function, as such:
using System.Linq;
And all was well!
thanks, I encountered the same problem and untill found your post..
ReplyDeleteGetting same error
DeleteThis helped me as well. Thank you!
ReplyDeleteWas faked out by having previously included System.XML.Linq....