Parameter expression has unexpected type

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    36 posts
    Member since:
    Apr 2009

    Posted 05 Apr 2011 Link to this post

    I am fairly new to linq and ef, any help is appriciated.

    The query runs fine in Linqer but errors when I bind it to my listbox, I have added .ToList but I get the same results, it seems
    as though my query results is returning the wrong type.  I dont know what I am doing wrong with this query, below is the code

    ''Where Not In GenresMovieLink
           Dim qry = From genres In dbContext.Genres _
                Where _
                Not _
                (From genres0 In dbContext.Genres _
                 From movies In genres0.Movies _
                 Where _
                   CLng(movies.MovieID) = 19 _
                 Select genres0.GenreID).Contains(genres.GenreID) _
                Select _
                  genres.GenreID, _
           lbGenres.DataTextField = "Name"
           lbGenres.DataValueField = "GenreID"
           lbGenres.DataSource = qry.ToList
  2. Zoran
    Zoran avatar
    534 posts

    Posted 11 Apr 2011 Link to this post

    Hi Daniel,

     This query does not seem wrong from the first sight but there is really no information for us to tell you if there is a problem and if the query is even executed against  OpenAccess of EF as mentioned in your ticket. 

    Kind regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top