Created
August 7, 2012 22:43
-
-
Save marciol/3290143 to your computer and use it in GitHub Desktop.
Custom System Routes (Nancy inspired)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get("foo/bar.html", | |
| (request, response) => { | |
| using (var connection = new SqlConnection( | |
| System.Configuration.ConfigurationManager.AppSettings["strConnection"])) | |
| { | |
| connection.Open(); | |
| var result = connection.Query<ExecutiveReportResult>( | |
| Util.getSql("rm_consulta_relatorio_executivo"), | |
| new { Anos = new int[] { 2012 }, Meses = new int[] { 1, 2, 3 }, CodigoInterno = "1.1.4" }); | |
| Render("ExecutiveReport.liquid", result, response); | |
| } | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment