Re: LINQ Queries vs Stored Procs
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Wed, 9 Jan 2008 07:35:38 -0000
Paul Shapiro <paul@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
I think the security issue is the big one. If ALL data access is via Stored
Procedures, you can limit the user to only executing stored procedures,
without allowing read permissions on any tables. If you have well-defined
application roles, you can group users into role-based security groups and
assign the minimally-necessary permissions on the stored procedures.
True. Where that level of security is actually necessary, stored procs
are great. Where they're not, I think they're an extra overhead.
Stored
procedures eliminate most sql injection attacks, which are more possible
with dynamic sql.
Can you show me a SQL injection attack with LINQ to SQL, which is the
dynamic sql option here?
I personally prefer putting sql into stored procs instead of the application
because I find it a more effective way to organize the code. It separates
the database processing details from the application processing. But I think
that's just personal preference.
That sounds great in theory, but I think it adds an extra overhead if
you need flexibility of search. It can also be a real pain in cases
where you need really dynamic queries, e.g. allowing users to specify
multiple criteria in a flexible way.
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
.
- References:
- LINQ Queries vs Stored Procs
- From: Frank Calahan
- Re: LINQ Queries vs Stored Procs
- From: Jon Skeet [C# MVP]
- Re: LINQ Queries vs Stored Procs
- From: Frank Calahan
- Re: LINQ Queries vs Stored Procs
- From: Jon Skeet [C# MVP]
- Re: LINQ Queries vs Stored Procs
- From: Paul Shapiro
- LINQ Queries vs Stored Procs
- Prev by Date: Limitations
- Next by Date: Re: Limitations
- Previous by thread: Re: LINQ Queries vs Stored Procs
- Next by thread: Re: LINQ Queries vs Stored Procs
- Index(es):
Relevant Pages
|