Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
T-SQL query to LINQ
Message
 
 
À
22/10/2014 02:06:59
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01609660
Message ID:
01609755
Vues:
49
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform