Linq Problem - Sequence contains no matching element

Posted by Pino on Stack Overflow See other posts from Stack Overflow or by Pino
Published on 2010-05-25T13:04:17Z Indexed on 2010/05/25 13:11 UTC
Read the original article Hit count: 971

Filed under:
|

Ok I have the following, set-up and am recieving the following error.

returnData.Options = this.ProductOptions.Select(o => o.ToDataModel()).ToList();

This line of code should do a conversion from DAL Entity (Subsonic) to a ViewModel. However I am recieving the following error message

Server Error in '/' Application.
Sequence contains no matching element 

Now, I've checked and the this.ProductOptions variable contains 3 results.

Whats does this error meen and how can I debug it?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-mvc