Hi,
According to my knowledge, I can prefer Stored Procedures over LINQ. LINQ is a handy tool, but it
has some disadvantages while we operate on the database(sql server). If your application or system
consists multilevel (n-tired) of data processing and having a large huge number of transactions, then
I would suggest SP is the best thing. Infact in any case SP would be the best as it runs in the
DB - provides direct object relational mapping. If you use Linq, it runs in the App server or web server,
it faces some difficulty with the Database server effects on memory utilization and the turn around time.
Then it will definetely slow down the operation because of the above reasons mentioned. So SP would
be the better option as it completely evades the application logic from the logic which is been extracted out of DB operations.
Changing the any Linq code consumes more time compare with SP code.
In othe side, Linq vs stored procedure, it depends on your needs. Whenever an operation that will handle
large amounts of data between tables for analysis, data processing, and display reports, a stored procedure
is a good option because large amounts of data will be traveling through the various layers into to the application.
And any other cases used to involves small and fast data transfer between app and db server Linq is a pretty good.
== Mallesh
Naraayanan, if this helps please login to Mark As Answer. | Alert Moderator