LINQ Question

  • Thread starter Thread starter Richard U
  • Start date Start date
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?
 
Ok, I tried that, and my code line is now...

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

but still getting the same exception
 
Back
Top