Why do I need Stored Procedures when I have LINQ to SQL

前端 未结 18 1287
栀梦
栀梦 2021-02-05 15:59

My understanding of Linq to Sql is it will take my Linq statement and convert it into an equivalent SQL statement.

So

var products = from p in db.Product         


        
18条回答
  •  耶瑟儿~
    2021-02-05 16:15

    Stored procedure support for LINQ to SQL was included partly for compatibility with existing systems. This allows developers to migrate from a sproc-based system to a fully LINQ-based system over time, sproc by sproc, rather than forcing developers to make a rush to convert an entire system all at once.

提交回复
热议问题