I am trying to create a LINQ query to return genres by movieid. The LINQ works in LINQPAD4. Can someone help me with the proper syntax? I am getting the following errors:
Cannot implicitly convert type 'System.Linq.IQueryable' to 'System.Linq.IQueryable'. An explicit conversion exists (are you missing a cast?)
and
Cannot implicitly convert type 'System.Collections.Generic.List' to 'System.Collections.Generic.List'
Code:(note I have wrapped Title in the following line with parenthesis, but are actually brackets in my code.
public List(Genre) GetGenresByMovieId(string movieid)
{
var genres = from t in MovieCatalog.Titles
where t.Id == "BVlLx"
select t.Genres; return genres.ToList();
}