CreateStoredProcedureScripts() public méthode

Creates code for stored procedures
public CreateStoredProcedureScripts ( SqlSProcPublishSettings settings, IEnumerable sprocFiles ) : SProcMap
settings SqlSProcPublishSettings
sprocFiles IEnumerable
Résultat SProcMap
Exemple #1
0
        private void CreateDacPac(SqlSProcPublishSettings settings, IEnumerable <string> sprocFiles, string dacpacPath)
        {
            var project  = _pss.GetSelectedProject <IVsHierarchy>()?.GetDTEProject();
            var g        = new SProcScriptGenerator(_fs);
            var sprocMap = g.CreateStoredProcedureScripts(settings, sprocFiles);
            var builder  = _dacServices.GetBuilder(_appShell);

            builder.Build(dacpacPath, project.Name, sprocMap.Scripts);
        }
        private SProcMap CreateStoredProcedureFiles(SqlSProcPublishSettings settings, IEnumerable<string> sprocFiles, string targetFolder, EnvDTE.ProjectItem targetProjectItem) {
            var g = new SProcScriptGenerator(_fs);

            var sprocMap = g.CreateStoredProcedureScripts(settings, sprocFiles);

            foreach (var name in sprocMap) {
                var template = sprocMap[name];
                if (!string.IsNullOrEmpty(template)) {
                    var sprocFile = Path.ChangeExtension(Path.Combine(targetFolder, name), ".sql");
                    _fs.WriteAllText(sprocFile, template);
                    targetProjectItem.ProjectItems.AddFromFile(sprocFile);
                }
            }
            return sprocMap;
        }
Exemple #3
0
        private SProcMap CreateStoredProcedureFiles(SqlSProcPublishSettings settings, IEnumerable <string> sprocFiles, string targetFolder, EnvDTE.ProjectItem targetProjectItem)
        {
            var g = new SProcScriptGenerator(_fs);

            var sprocMap = g.CreateStoredProcedureScripts(settings, sprocFiles);

            foreach (var name in sprocMap)
            {
                var template = sprocMap[name];
                if (!string.IsNullOrEmpty(template))
                {
                    var sprocFile = Path.ChangeExtension(Path.Combine(targetFolder, name), ".sql");
                    _fs.WriteAllText(sprocFile, template);
                    targetProjectItem.ProjectItems.AddFromFile(sprocFile);
                }
            }
            return(sprocMap);
        }
Exemple #4
0
 private void CreateDacPac(SqlSProcPublishSettings settings, IEnumerable<string> sprocFiles, string dacpacPath) {
     var project = _pss.GetSelectedProject<IVsHierarchy>()?.GetDTEProject();
     if (project != null) {
         var g = new SProcScriptGenerator(_fs);
         var sprocMap = g.CreateStoredProcedureScripts(settings, sprocFiles);
         var builder = _dacServices.GetBuilder();
         builder.Build(dacpacPath, project.Name, sprocMap.Scripts);
     }
 }