Here in docs of DbSet(TEntity)
I did not find toList()
. Why is that so although this method works when invoked on DbSet<TEntity>
as instance method. Related code I found is:
Part of controller:
private MovieDBContext db = new MovieDBContext();
// GET: /Movie/
public ActionResult Index()
{
return View(db.Movies.ToList());
}
DbContext class:
public class MovieDBContext : DbContext
{
public DbSet<Movie> Movies { get; set; }
}