Domanda

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?

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top