Here is my action method from controller.
public class MoviesController : Controller
{
private MovieDBContext db = new MovieDBContext();
// GET: /Movies/
public ActionResult Index()
{
return View( db.Movies.ToList() );
}
}
As it can be seen a List is being passed to View that is why I am expecting to work with it as Listin view but in View it works as IEnumerable
Following is the first line from View
@model IEnumerable<MVCWebApplication2.Models.Movie>
Why passed value that was List behaves as IEnumerable?
Is IEnumerable super class of List?