public CreateStoredProcedureScripts ( |
||
settings | ||
sprocFiles | IEnumerable |
|
리턴 | SProcMap |
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; }
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); }
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); } }