c# - Where can I find documentation for DbSet.toList()? -
here in docs of dbset(tentity)
did not find tolist()
. why although method works when invoked on dbset<tentity>
instance method. related code found is:
part of controller:
private moviedbcontext db = new moviedbcontext(); // get: /movie/ public actionresult index() { homecoming view(db.movies.tolist()); }
dbcontext class:
public class moviedbcontext : dbcontext { public dbset<movie> movies { get; set; } }
dbset implements ienumerable. tolist extension method available on ienumerable system.linq.enumerable class.
within ide, can tell extension method icon , fact first parameter uses this
keyword.
c# asp.net asp.net-mvc entity-framework
No comments:
Post a Comment