Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (var manager = new NHibernateManager())
- {
- var session = manager.GetSession();
- using (var transaction = session.BeginTransaction())
- {
- /*------Сюда вставляются различные void функции ------*/
- transaction.Commit();
- }
- }
- void RunTransaction(System.Action anAction)
- {
- //...
- anAction();
- //...
- }
- void SomeMethod()
- {
- }
- RunTransaction(SomeMethod);
- RunTransaction(() => { /* any code */ });
Add Comment
Please, Sign In to add comment