LINQ Syntax and SQL Syntax

Why did Andres Halesberg develop LINQ syntax in order to differ from SQL syntax (as a result of which programmers began to learn a completely new thing)?

Isn't it better if he used the same syntax as for SQL?

+3
source share
3 answers

LINQ must not be SQL. This meant a query language that is as independent of the data source as possible. Now, admittedly, it has a strong SQL bias, but that doesn't mean just embedding SQL in the source code (fortunately).

LINQ SQL. , LINQ . , . , , , .. . SQL, , , , .

LINQ , - Visual Studio , , , select (), IntelliSense. , LINQ " " , - , .

, : , LINQ , SQL.

+21

SQL - ! (T-, PL- ..).

, . LINQ , (FROM), (WHERE)/projection (SELECT), .. ( intellisense) . , , .

+5

The easiest way to parse an expression is when the initial data is provided at the beginning.

Because of this, VS provides code completion even for partially written LINQ queries (great IMO feature).

+2
source

Source: https://habr.com/ru/post/1719950/


All Articles