I'm trying to use TransactionScope With Nhibernate. Is there any example with configuration settings to get it working.
Framework: .Net core 3.0
Sample code
Fluently.Configure()
.Database(
OracleManagedDataClientConfiguration.Oracle10.ConnectionString(connectionString))
.Mappings(cfg =>
{
cfg.FluentMappings.AddFromAssemblyOf();
}).BuildConfiguration();
using(var tx = new TransactionScope(TransactionScopeOption.Required))
{
// update model
_session.Flush();
tx.Complete();
}
I'm getting no errors but the record doesn't get committed. Can someone share a sample code or a unit test within the solution which shows the implementation details?
I'm pretty new to NHibernate and any help is highly appreciated !!