コード例 #1
0
        internal virtual void MapToStoredProcedures(
            ModificationFunctionsConfiguration modificationFunctionsConfiguration, bool allowOverride)
        {
            DebugCheck.NotNull(modificationFunctionsConfiguration);

            if (_modificationFunctionsConfiguration == null)
            {
                _modificationFunctionsConfiguration = modificationFunctionsConfiguration;
            }
            else
            {
                _modificationFunctionsConfiguration.Merge(modificationFunctionsConfiguration, allowOverride);
            }
        }
        public void Can_merge_configurations()
        {
            var modificationFunctionsConfigurationA = new ModificationFunctionsConfiguration();
            var modificationFunctionConfiguration   = new ModificationFunctionConfiguration();

            modificationFunctionsConfigurationA.Insert(modificationFunctionConfiguration);
            modificationFunctionsConfigurationA.Update(modificationFunctionConfiguration);
            modificationFunctionsConfigurationA.Delete(modificationFunctionConfiguration);

            var modificationFunctionsConfigurationB = new ModificationFunctionsConfiguration();

            modificationFunctionsConfigurationB.Merge(modificationFunctionsConfigurationA, true);

            Assert.Same(modificationFunctionConfiguration, modificationFunctionsConfigurationB.InsertModificationFunctionConfiguration);
            Assert.Same(modificationFunctionConfiguration, modificationFunctionsConfigurationB.UpdateModificationFunctionConfiguration);
            Assert.Same(modificationFunctionConfiguration, modificationFunctionsConfigurationB.DeleteModificationFunctionConfiguration);
        }
コード例 #3
0
        public void Can_merge_configurations()
        {
            var modificationFunctionsConfigurationA = new ModificationFunctionsConfiguration();
            var modificationFunctionConfiguration = new ModificationFunctionConfiguration();

            modificationFunctionsConfigurationA.Insert(modificationFunctionConfiguration);
            modificationFunctionsConfigurationA.Update(modificationFunctionConfiguration);
            modificationFunctionsConfigurationA.Delete(modificationFunctionConfiguration);

            var modificationFunctionsConfigurationB = new ModificationFunctionsConfiguration();

            modificationFunctionsConfigurationB.Merge(modificationFunctionsConfigurationA, true);

            Assert.Same(modificationFunctionConfiguration, modificationFunctionsConfigurationB.InsertModificationFunctionConfiguration);
            Assert.Same(modificationFunctionConfiguration, modificationFunctionsConfigurationB.UpdateModificationFunctionConfiguration);
            Assert.Same(modificationFunctionConfiguration, modificationFunctionsConfigurationB.DeleteModificationFunctionConfiguration);
        }