title: How can I execute this sql statement with .NET and Dapper.NET?
body: <p>I have the following sql query:</p>
  
  <pre><code>BEGIN TRAN;
  
  UPDATE [dbo].[Foo] SET StatusType = 2 WHERE FooId = xxx;
  INSERT INTO [dbo].[FooNotes] (FooId, Note) VALUES ('blah....', xxx);
  
  ROLLBACK TRAN;
  </code></pre>
  
  <p>and this is for a list of id's. 
  eg.</p>
  
  <pre><code>var fooIds = new [] { 1, 2, 3, 4, 5, 6 };
  </code></pre>
  
  <p>so then I expect this..</p>
  
  <pre><code>BEGIN TRAN;
  
  UPDATE [dbo].[Foo] SET StatusType = 2 WHERE FooId = 1;
  INSERT INTO [dbo].[FooNotes] (FooId, Note) VALUES ('blah....', 1);
  
  UPDATE [dbo].[Foo] SET StatusType = 2 WHERE FooId = 2;
  INSERT INTO [dbo].[FooNotes] (FooId, Note) VALUES ('blah....', 2);
  
  UPDATE [dbo].[Foo] SET StatusType = 2 WHERE FooId = 3;
  INSERT INTO [dbo].[FooNotes] (FooId, Note) VALUES ('blah....', 3);
  
  ROLLBACK TRAN;
  </code></pre>
  
  <p>Can this be done with <a href="https://github.com/StackExchange/dapper-dot-net" rel="nofollow">Dapper</a>? </p>
  
  <p>NOTE: If the <code>TRAN</code> makes this hard, I can drop that.</p>