I have one linq query which is simply retrieving a list of values based on one where condition. But, the query is taking lot of time to execute. I can see that in DBMonitor. Also, when I excute the same sql query on the sql developer, then it executes instantly.
Can anyone plz guide me on this?
Thanks.
Linq query taking lot of time to execute
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Glad to see that the problem was resolved. Could you please specify what should be changed to fix it?
JIC: the code you've specified seems to be incorrect, as explicit calls of entity class constructors are not allowed in LinqConnect queries. As far as I can understand, the query should be
JIC: the code you've specified seems to be incorrect, as explicit calls of entity class constructors are not allowed in LinqConnect queries. As far as I can understand, the query should be
Code: Select all
var cplItems =
from c in context.CPLs
where c.ProgramNumber == ProgramNumber
select c;