This question is locked. New answers and comments are not allowed.
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
TIA.
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
TIA.
''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, _
genres.Name
lbGenres.DataTextField =
"Name"
lbGenres.DataValueField =
"GenreID"
lbGenres.DataSource = qry.ToList
lbGenres.DataBind()