Esempio n. 1
0
        /// <summary>
        /// Add text to stored procedure
        /// </summary>
        /// <param name="text">Text to add</param>
        private void AddToStoredProcedure(MsSqlDbObjectText text)
        {
            MsSqlStoredProcedureSchema sp = _storedProcedures.SingleOrDefault(p => p.SchemaName == text.SchemaName && p.ObjectName == text.ObjectName);

            if (sp == null)
            {
                sp = new MsSqlStoredProcedureSchema(text.SchemaName, text.ObjectName);
                _storedProcedures.Add(sp);
            }

            sp.AddText(text);
        }
Esempio n. 2
0
        /// <summary>
        /// Add parameter to stored procedure
        /// </summary>
        /// <param name="prms">Parameter to add</param>
        private void AddToStoredProcedure(MsSqlDbObjectParam prms)
        {
            MsSqlStoredProcedureSchema sp = _storedProcedures.SingleOrDefault(p => p.SchemaName == prms.SchemaName && p.ObjectName == prms.ObjectName);

            if (sp == null)
            {
                sp = new MsSqlStoredProcedureSchema(prms.SchemaName, prms.ObjectName);
                _storedProcedures.Add(sp);
            }

            sp.AddParam(prms);
        }