Entity Framework & LINQ To SQL - Conflict of interest?

后端 未结 3 1877
忘掉有多难
忘掉有多难 2021-02-01 08:27

I\'ve been reading on the blogosphere for the past week that Linq to SQL is dead [and long live EF and Linq to Entities]. But when I read the overview on MSDN, it appeared to m

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-01 09:10

    Actually, the EF does not generate EntitySQL when translating LINQ queries. In the EF we have a data structure-based representation for all queries called CQT or canonical query trees. Both the LINQ translator and the EntitySQL parser produce CQTs, and the rest of the query translation pipeline uses CQTs (and other internal intermediate forms), which after various transforms make it to the ADO.NET provider (as a store-level CQT), which is then responsible for translating it to the backend's SQL dialect. So the paths are LINQ -> CQT -> SQL or EntitySQL -> CQT -> SQL.

提交回复
热议问题