コード例 #1
0
        public string GetStoredProcedureCommandName(DbStoredProcedureType storedProcedureType, SyncFilter filter = null)
        {
            if (!storedProceduresNames.ContainsKey(storedProcedureType))
            {
                throw new Exception("Yous should provide a value for all DbCommandName");
            }

            var commandName = storedProceduresNames[storedProcedureType];

            // concat filter name
            if (filter != null && (storedProcedureType == DbStoredProcedureType.SelectChangesWithFilters || storedProcedureType == DbStoredProcedureType.SelectInitializedChangesWithFilters))
            {
                commandName = string.Format(commandName, filter.GetFilterName());
            }

            return(commandName);
        }
コード例 #2
0
        public string GetTriggerCommandName(DbTriggerType objectType, SyncFilter filter = null)
        {
            if (!triggersNames.ContainsKey(objectType))
            {
                throw new Exception("Yous should provide a value for all DbCommandName");
            }

            var commandName = triggersNames[objectType];

            // concat filter name
            if (filter != null)
            {
                commandName = string.Format(commandName, filter.GetFilterName());
            }

            return(commandName);
        }
コード例 #3
0
        public string GetCommandName(DbCommandType objectType, SyncFilter filter = null)
        {
            if (!commandNames.ContainsKey(objectType))
            {
                throw new NotSupportedException($"MySql provider does not support the command type {objectType.ToString()}");
            }

            var commandName = commandNames[objectType];

            // concat filter name
            if (filter != null)
            {
                commandName = string.Format(commandName, filter.GetFilterName());
            }

            return(commandName);
        }