Thank you for ORM.NET, it is a great tool!
I see there is no way to perform several .NET operations
against the database in a single transaction, e.g.
// begin transaction here
StoredProcedures.myproc1(x,y);
StoredProcedures.myproc2(z);
// end transaction now
I see no way to do this with ORM.NET now because
each StoredProcedures operation will commit its own
transaction wich is not what I want.
I want to be able to commit several .NET operations at
the same time or rollback all of them if one fails.
What I think would be necesssary is the code generator
should be modified to add a method signature that
allows to pass a Transaction reference as a parameter,
e.g.
// begin transaction here
Transaction tx = ...;
try {
StoredProcedures.myproc1(tx,x,y);
StoredProcedures.myproc2(tx,z);
// end transaction now
tx.Commit();
} catch(Exception e) {
tx.Rollback();
}
It is not necessary to modify OrmLib.
Only the code generator.
Logged In: YES
user_id=1243729
I created this bug.
You can contact me at jborrajo@users.sourceforge.net
or j_borrajo@hotmail.com
Logged In: NO
Do your multiple calls via traditional ADO.Net. I rely on ORM
for insert, updates and deletes and the occasional single
StoredProc call but still use the traditional ADO.Net for
things such as this. It's hardly a drawback compared to the
overall good of the product.