By replacing @@identity with SCOPE_IDENTITY() I am getting a deadlock, though using scope_identity() is recommended by Microsoft.
In my C# method, I have lot of insert queries for master and it's details. Does anyone know why calling scope_identity() would cause timeout or deadlock issues?