Can I set lock priority in Entity Framework?

Is there a way to prioritize SQL stubs in Entity Framework without having to explicitly open each connection and invoke an SQL command to set the blocking priority for that particular connection before using it?

Using explicit joins all over the world and issuing the SQL deadlock priority command is the only way I've found so far that is a little painful.

I am currently working with Entity Framework versions 5 and 6 in different applications.

The goal is to establish a low level of blocking in automated applications (which can repair / redo on their own) so that they do not interfere with user applications while the blocking problems are fixed.

Note: This question is not about tracking or preventing deadlocks in Entity Framework - this other question is well handled elsewhere here.

+3


source to share


1 answer


You can deadlock by running an explicit SQL statement / command or by running a stored procedure. It can also work at the transaction isolation level or query hints. See https://msdn.microsoft.com/en-us/library/dn456843%28v=vs.113%29.aspx?f=255&MSPPError=-2147217396



0


source







All Articles