Advertisement
Guest User

Untitled

a guest
Aug 21st, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. public void someMethod(...){
  2. using (SqlConnection sqlCon = new SqlConnection(conStr))
  3. {
  4. using (var trans = sqlCon.BeginTransaction())
  5. {
  6. //something that uses trans/sqlCon
  7. }
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement