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

前端 未结 18 1071
栀梦
栀梦 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:19

    I'm coming rather late to this thread. But depending on who you talk to, Linq to SQL is either dead, very dead, or at best a zombie.

    In addition, no single tool suits every situation - you need to choose the right tool for the specific job in hand:

    • Stored procs enable you to enforce complex business rules across multiple client applications.
    • Stored procs can give you a great security layer.
    • Stored procs can give you a great abstraction layer.
    • Stored procs can give you better caching in some circumstances.

提交回复
热议问题