예제 #1
0
        public static string MakeScript(string baseName, SqlScript script, List <string> resultTypes, List <ResultFieldDetails> scriptParams)
        {
            var result = StartClass(baseName);

            if (resultTypes.Count > 1)
            {
                result += MakeMapperFunc(resultTypes, script.ResultNames, baseName + "Result");
            }
            result += MakeTestParams(baseName + "Params", scriptParams);
            result += MakeMultilineStringProperty("Sql", script.DeclareText + script.InitializeParamsText + script.ExecutionText);
            return(result += CloseClass());
        }
예제 #2
0
 public PocoBuilder(DocumentHelper helper, string sqlText, Action <string> logger)
 {
     _logger         = logger;
     _documentHelper = helper;
     _sqlScript      = new SqlScript(sqlText, _documentHelper.BaseName);
 }