LINQ and server side execution
-
Hi, With LINQ the queries are executed on server via server side code so doesn't it create extra load on server for query. Is it true that we can run db queries or sp's gives more performance over LINQ queries? Please justify whether it's true or not?
-
Hi, With LINQ the queries are executed on server via server side code so doesn't it create extra load on server for query. Is it true that we can run db queries or sp's gives more performance over LINQ queries? Please justify whether it's true or not?
I am assuming you are referring to Linq to SQL.
Member 3981366 wrote:
server via server side code
You mean database server? Yes
Member 3981366 wrote:
doesn't it create extra load on server
What do you mean by "extra load" ? You need data so you will query the database, isnt it ?
Member 3981366 wrote:
Is it true that we can run db queries or sp's gives more performance over LINQ queries
I do not understand this statement.The LINQ query is converted to a db query and then it is run on the database. So why do you feel it is different ? Well, there are some performance considerations but there are suggestions to overcome them too. The LINQ query will be converted to an database query and run on the databse returning you the result. It provides you with a strongly typed query language. See here Lind to SQL[^]