Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Add parameter to table
        /// </summary>
        /// <param name="prms">Parameter to add</param>
        private void AddToTable(MsSqlDbObjectParam prms)
        {
            MsSqlTableSchema table = _tables.SingleOrDefault(t => t.SchemaName == prms.SchemaName && t.ObjectName == prms.ObjectName);

            if (table == null)
            {
                table = new MsSqlTableSchema(prms.SchemaName, prms.ObjectName);
                _tables.Add(table);
            }

            table.AddParam(prms);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Add column paameter to this table
 /// </summary>
 /// <param name="param">Column parameter</param>
 public void AddParam(MsSqlDbObjectParam param)
 {
     _prms.Add(param);
 }