Question

I have a table in database with a primary key say emp_pk. Now using LINQ I am trying to perform some operations on it. When I change few properties and call,

context.SubmitChanges();

ideally the where clause should contain where emp_pk = value.

But when I review the query from SQL profiler, I see lot of conditions in where clause, which I believe are generated by LINQ engine. This is causing a major performance issue.

Can anyone please help me in this case to optimize the query?

Was it helpful?

Solution

That's because optimistic concurrency check is enabled. You can turn it off per column by setting Update Check=never per column in the dbml designer

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top