c# - Entity Framework query builder methods: why "it" and not lambdas? -


I am just starting with EF and I have a strange question like a string in an odd form:

  var departmentQuery = schoolContext.Departments.Include ("Course"). OrderBy ("it.Name");  

Specifically, what sticks to me is "this name." When I was tuing around with LINQ from SQL, query-builder queries can be very much specified in each filter with lambda, like, in this case, d => d.Name.

I see there are overrides of orderbars that take longitude which returns an iDardDevelopable or iOrdedNAnBible, but there is clearly no required execution method to achieve those object results, after which There may be a database in it.

It seems strange to me all I have read how lambda is such a big deal for such things, and their expression has been translated into trees and then in a target language - me Why is it necessary to use "it.Name"?

I get a long expression with me; What can I do (this is some property == 1) ... do you have a system Linux as a namespace? You can try restructuring as:

var department = d in school Contex Departments. Include ("course") order by d. Choose name d;

These are some possibilities.

H.H.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -