internal string WriteWithResultClass() { WriteTop(); WriteClass(); if (HasResultClass) { var rs = new SprocResultWriter(_storedProcedure, _namespace, _cb); rs.WriteClasses(); } WriteEnd(); return _cb.ToString(); }
internal string WriteWithResultClass() { WriteTop(); WriteClass(); if (HasResultClass) { var rs = new SprocResultWriter(_storedProcedure, _namespace, _cb); rs.WriteClasses(); } WriteEnd(); return(_cb.ToString()); }
private static void WriteStoredProcedure(string procedures, string directoryPath, string @namespace, DatabaseStoredProcedure sproc, ProjectWriter pw) { //if no .net classname, don't process if (string.IsNullOrEmpty(sproc.NetName)) return; var sw = new SprocWriter(sproc, @namespace); var txt = sw.Write(); var fileName = sproc.NetName + ".cs"; var path = Path.Combine(directoryPath, fileName); File.WriteAllText(path, txt); pw.AddClass(procedures + @"\" + fileName); if (sw.RequiresOracleReference) { if (sw.RequiresDevartOracleReference) pw.AddDevartOracleReference(); else pw.AddOracleReference(); } if (sw.HasResultClass) { var rs = new SprocResultWriter(sproc, @namespace); txt = rs.Write(); fileName = rs.ClassName + ".cs"; path = Path.Combine(directoryPath, fileName); File.WriteAllText(path, txt); pw.AddClass(procedures + @"\" + fileName); } }