Nhibernate session.BeginTransaction() vs. transaction.Begin()
问题 My question is related to use of nhibernate transactions Is the transaction.Begin() below a problem? or just redundant? using (var transaction = session.BeginTransaction()) { transaction.Begin(); action(); transaction.Commit(); } 回答1: After checking the source, transaction.Begin() is in fact redundant - a harmless no-op. link to source 回答2: beginTransaction as it states begins a transaction, on the other hand session.Transaction will return the current active transaction if null will create