Esempio n. 1
0
        public void UsesSuppliedExtendedDialect()
        {
            var expected = typeof(DummyExtendedDialect);
            var actual   = DialectMap.GetExtendedDialectType(expected);

            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        public void UsesMapOfExtendedDialects()
        {
            var supplied = typeof(MsSql2008Dialect);
            var expected = typeof(ExtendedMsSql2008Dialect);
            var actual   = DialectMap.GetExtendedDialectType(supplied);

            Assert.AreEqual(expected, actual);
        }
Esempio n. 3
0
        private void UpdateDialect()
        {
            var dialect = Dialect.GetDialect(_configuration.Properties);

            var eDialectType = DialectMap
                               .GetExtendedDialectType(dialect.GetType());

            if (eDialectType == null)
            {
                throw new ApplicationException(
                          "Dialect must implement IExtendedDialect to "
                          + "create audit triggers");
            }

            if (eDialectType != dialect.GetType())
            {
                _configuration.SetProperty(
                    NHibernate.Cfg.Environment.Dialect,
                    eDialectType.AssemblyQualifiedName);
            }
        }