SQL Stored Procedure In .NET

I generally end up forgetting how to return results from a SQL stored procedure within .NET so I figured I’d put it here for reference. public static List<Blog> GetBlogSummaries() { List<Blog> blogs = new List<Blog>(); using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings[“BlogDatabase”].ConnectionString)) { using (SqlCommand command = new SqlCommand(“sp__get_blog_summaries”)) { command.CommandType Read more…

Basic HTML Code Snippets

This is essentially just based on Google prettify which can be found here. Just stick the following code in the head of the page to load the javascript. <script src=”https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js”></script> And then put the code you’d like to prettify in the following tags. <pre class=”prettyprint lang-html”></pre> If using this for Read more…