Best way of constructing dynamic sql queries in C#/.NET3.5?

后端 未结 12 2830
走了就别回头了
走了就别回头了 2021-02-15 11:25

A project I\'m working on at the moment involves refactoring a C# Com Object which serves as a database access layer to some Sql 2005 databases.

The author of the existe

12条回答
  •  独厮守ぢ
    2021-02-15 11:48

    Its worth considering if you can implement as a parameterised strored procedure and optimise it in the database rather than dynamically generating the SQL via LINQ or an ORM at runtime. Often this will perform better. I know its a bit old fashioned but sometimes its the most effective approach.

提交回复
热议问题