Linq over Stored Procedures

后端 未结 9 598
长情又很酷
长情又很酷 2021-01-05 11:19

What are some pros and cons of using linq over stored procedures?

9条回答
  •  佛祖请我去吃肉
    2021-01-05 12:16

    Since nobody's added a CON - I'll suggest one here...

    Stored Procs offer you the ability to deny select/insert/delete/update on your base tables and views, so you could have potentially better security using stored procs as you could using Linq to SQL. By granting exec permissions only on your procs, you have a smaller surface area to manage for security.

    Of course - you can still use Linq to SQL and stored procs together - maybe that would be the better option.

提交回复
热议问题