public static void BuildContentFromProc(this DbContextOracle connection, StringBuilder sb, List <string> schemas, List <string> names) { var sources = connection.GetCodeFromProc(schemas, names); if (sources.Count == 0) { } else if (sources.Count == 1) { var item = sources.FirstOrDefault(); sb.Append("CREATE OR REPLACE "); sb.Append(Utils.Unserialize(item.Code, true)); } else { for (int i = 0; i < sources.Count; i++) { var item = sources[i]; sb.Append("CREATE OR REPLACE "); var t = Utils.Unserialize(item.Code, true); t = t.Trim() .Trim('/') .Trim(); sb.Append(t); sb.AppendLine(String.Empty); sb.AppendLine("/"); } if (System.Diagnostics.Debugger.IsAttached) { System.Diagnostics.Debugger.Break(); } } }
public static void BuildContentFromPackage(this DbContextOracle connection, StringBuilder sb, List <string> schemas, List <string> names, bool isBody) { var sources = connection.GetCodeFromProc(schemas, names); if (isBody) { foreach (var item in sources) { var t = Utils.Unserialize(item.Code, true); var t2 = Bb.Oracle.Helpers.ContentHelper.FormatSource(t); sb.Append("CREATE OR REPLACE "); } } else { } }