Home Forums SQL Server 7,2000 Strategies n-hibernate and dynamic sql - DBA vs Developers RE: n-hibernate and dynamic sql - DBA vs Developers

  • LINQ uses dynamic queries behind the scenes. You can make use of Stored Procedures with LINQ .. but you lose all the smarts. You write the queries instead of letting Visual Studio do it :hehe:

    YES stored procedures are the way to go but there are situations that Stored Procedures are not a good solution and are slower solution than dynamic queries. An example is a search query with 15 (or 4 or 8 ..) parameters when parameters can be NULL.

    So, the point is not to force absolute rules about permitting Stored Procedures ONLY but allowing for exceptions when they make sense. And, yes .. caching can be faster than accessing a database.