Linq to sql

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
15 năm cách đây
Why not use linq to sql in project since its .net 3.5 based ?

Daniel
15 năm cách đây
"I am generally a proponent of putting everything in stored procedures, for all of the reasons DBAs have been harping on for years. In the case of Linq, it is true that there will be no performance difference with simple CRUD queries.

But keep a few things in mind when making this decision: using any ORM couples you tightly to your data model. A DBA has no freedom to make changes to the data model without forcing you to change your compiled code. With stored procedures, you can hide these sorts of changes to an extent, since the parameter list and results set(s) returned from a procedure represent its contract, and the innards can be changed around, just so long as that contract is still met.

And also, if Linq is used for more complex queries, tuning the database becomes a much more difficult task. When a stored procedure is running slow, the DBA can totally focus on the code in isolation, and has lots of options, just so that contract is still satisfied when he/she is done.

Sql server will cache the query plans, so there's no performance gain for sprocs.

Your linq statements, on the other hand, will be logically part of and tested with your application. Sprocs are always a bit separated and are harder to maintain and test."
15 năm cách đây
I am developing application many years.. And after linq has released i include it in my new project by my own risk. It was a great mistake. Best way of data developming is to use Stored Procedures and CLR and linq only to work with this. It's more faster than dataset, but only with simple procedures.
15 năm cách đây
I appreciate this discussion as I am beginning to learn LINQ and I am very interested in the real-world (pros and cons).
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.