protected override void invoke(Action action) { action(); _session.SaveChanges(); // TODO -- add in logging later }
protected override void invoke(Action action) { action(); _session.SaveChanges(); _session.WithOpenSession(x => _logger.DebugMessage(() => TransactionalBehaviorRavenSessionUsageMessage.For(x, _httpRequest))); }
protected override async Task invoke(Func <Task> func) { try { await func().ConfigureAwait(false); await _session.SaveChanges().ConfigureAwait(false); } catch (Exception) { _session.Dispose(); throw; } }
public void load_all() { persistor.Persist(new User()); persistor.Persist(new User()); persistor.Persist(new User()); persistor.Persist(new OtherEntity()); persistor.Persist(new OtherEntity()); persistor.Persist(new ThirdEntity()); boundary.SaveChanges(); persistor.LoadAll <User>().Count().ShouldEqual(3); persistor.LoadAll <OtherEntity>().Count().ShouldEqual(2); persistor.LoadAll <ThirdEntity>().Count().ShouldEqual(1); }
protected override void invoke(Action action) { action(); _session.SaveChanges(); }