What is the difference between LINQ query expressions and extension methods

后端 未结 8 1074
一个人的身影
一个人的身影 2020-12-23 15:39

Below are two queries that return the same data. Other then style I am not sure which is better.

What factors influence these queries? What are the benefits of us

8条回答
  •  不知归路
    2020-12-23 15:45

    1./ Your question title does not match what you asked.
    2./ Your question title does not really make sense. Linq stands for Language Integrated Query and is an umbrella term for a bunch of technologies and practices, IQueryable is an interface that is commonly used to facilitate Linq. you are comparing Apples and Oranges
    3./ About your actual question, the main difference is style, for complex queries like this one, my personal preference is the 2nd version, as it clearly shows the progression of the result sets.

提交回复
热议问题