LINQ Question

R

Richard U

hey guys... got the following line... int CurrentMediaTypeID = CurrentMediaType.Single().MediaTypeID; ... throwin the following exception: "LINQ to Entities does not recognize the method 'System.String get_Item(Int32)' method, and this method cannot be translated into a store expression. System.NotSupportedException: LINQ to Entities does not recognize the method 'System..String get_Item(Int32)' method, and this method cannot be translated into a store expression, any ideas?
 
R

Richard U

Ok, I tried that, and my code line is now...

int CurrentMediaTypeID = Convert.ToInt32(CurrentMediaType.Single().MediaTypeID);

but still getting the same exception
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top