/// <summary> /// Scans the procedures in the database. /// </summary> private void ScanProcedures(FilterCollection excludeProcedures, DatabaseDeploymentStructure structure) { // Retrieve procs in dest db and build a hashtable with them DataTable destprocs = _destinationDbService.GetProcedures().Tables[0]; Hashtable destprocstable = new Hashtable(); foreach(DataRow row in destprocs.Rows) { DbStoredProcedure proc = new DbStoredProcedure(row); destprocstable.Add(proc.Name, proc); } // Retrieve stored procedures and build deployment structure DataTable sourceprocs = _sourceDbService.GetProcedures().Tables[0]; foreach(DataRow row in sourceprocs.Rows) { DbStoredProcedure proc = new DbStoredProcedure(row); // Does this proc already exist in destination? proc.IsNew = !destprocstable.ContainsKey(proc.Name); if(!excludeProcedures.IsMatching(proc.Name)) structure.Add(proc); } }