public void Set_up_transaction_parameters() { DbLogHelper.SetupParametersForTriggerLogging( "test", "localhost"); Assert.That(session.CreateSQLQuery("select @InUser;").UniqueResult <string>(), Is.EqualTo("test")); Assert.That(session.CreateSQLQuery("select @InHost;").UniqueResult <string>(), Is.EqualTo("localhost")); }
public void ResetUin(uint id, string reason) { var user = DbSession.Load <User>(id); DbLogHelper.SetupParametersForTriggerLogging(new { ResetIdCause = reason }); AuditRecord.ReseteUin(user, reason).Save(); user.ResetUin(); Notify("УИН сброшен"); RedirectToReferrer(); }
public void Set_up_transaction_parameters_from_ananymous_object() { DbLogHelper.SetupParametersForTriggerLogging(new { InUser = "******", InHost = "localhost" }); Assert.That(session.CreateSQLQuery("select @InUser;").UniqueResult <string>(), Is.EqualTo("test")); Assert.That(session.CreateSQLQuery("select @InHost;").UniqueResult <string>(), Is.EqualTo("localhost")); }