title: SCOPE_IDENTITY in C# - range
body: <p>I've checked the documentation for <a href="http://msdn.microsoft.com/en-us/library/ms190315.aspx" rel="noreferrer">SCOPE_IDENTITY()</a>, and it says "A scope is a module: a stored procedure, trigger, function, or batch." That is simple when I'm running a query in SSMSE, but in C# I'm using SqlCommand for executing my statements.</p>
  
  <p>The question is: what is the scope there? Is executing subsequent commands under one connection an equivalent of batch? Or maybe every command is in a different scope and I need a transaction for this to work? </p>