LINQ's fluent syntax and query expressions
]LINQ provides two main syntaxes: fluent syntax and query expression syntax. While both are effective ways to write LINQ queries, which syntax to choose will affect your coding style and efficiency.
Advantages of query expression syntax
]Query expression syntax has the following advantages:
Advantages of smooth grammar
]On the other hand, fluent grammar also offers different advantages:
Select the appropriate grammar
The two grammars themselves have no advantages and disadvantages. The best choice depends on the specific query and developer preferences.
Store to use query expression syntax:
Something recommended to use fluent syntax:
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3