I have the following sql query:
BEGIN TRAN;
UPDATE [dbo].[Foo] SET StatusType = 2 WHERE FooId = xxx;
INSERT INTO [dbo].[FooNotes] (FooId, Note) VALUES ('blah....', xxx);
ROLLBACK TRAN;
and this is for a list of id's. eg.
var fooIds = new [] { 1, 2, 3, 4, 5, 6 };
so then I expect this..
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;
Can this be done with Dapper?
NOTE: If the TRAN makes this hard, I can drop that.