Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
T-SQL query to LINQ
Message
 
 
General information
Forum:
ASP.NET
Category:
LINQ
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01609660
Message ID:
01609755
Views:
50
>OTOH, why clutter up the server with potentially dozens of SP's the results of which may only be needed by one developer in one part of an application ?
>
>Conversely, if an SP is used there's a much greater possibility that a developer (or a DBA) may modify it to suit some specific need without realizing that it could impact on another area of the app.
>
>And I don't think the reference to 'constant fiddling' is relevant. Admittedly Naomi could probably whip up a SP in less time - conversely I'd be constantly fiddling with the T-SQL syntax :-{

I'm not exactly sure why this time I thought of going with the LINQ version rather than SP. Surely SP would take me a minute to write.

On the other hand, I, at least, learn 'let' syntax which apparently results in the subquery similar to what the original T-SQL was doing. (As I checked generated SQL using SQL Profiler).

I am thinking I am going to re-write this method to use SP after all.

UPDATE. I re-did this as a stored procedure.

Thanks, Kevin.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform