I am currently learning ASP.NET MVC and along with LINQ
I have followed a few tutorials and have a good concept of MVC. I have run into a problem though. I am trying to select a specific row from my table and sent it to the view but I am getting an error.
The code for the select is:
Movie Mov = new Movie();
Mov = from movies in _db.Movies
where movies.Title == "Ghostbusters"
select movies;
And the error is:
Error 2 Cannot implicitly convert type 'System.Linq.IQueryable<MvcApplication2.Models.Movie>' to 'MvcApplication2.Models.Movie'. An explicit conversion exists (are you missing a cast?) C:\Users\user\Desktop\MvcApplication2\MvcApplication2\Controllers\HomeController.cs 22 25 MvcApplication2
Thanks