Skip to content

Instantly share code, notes, and snippets.

View NiclasLindqvist's full-sized avatar

Niclas Lindqvist NiclasLindqvist

View GitHub Profile
@crallen
crallen / SnakeCaseContractResolver.cs
Created February 26, 2014 20:46
Json.NET contract resolver that uses Ruby-style lowercase with underscore naming conventions.
using Newtonsoft.Json.Serialization;
namespace ConsoleApplication3
{
public class SnakeCaseContractResolver : DefaultContractResolver
{
protected override string ResolvePropertyName(string propertyName)
{
return GetSnakeCase(propertyName);
}
@jkarsrud
jkarsrud / BundleInstall.md
Last active May 27, 2020 08:51
How to use ASP.NET Bundling and Minifications in Umbraco

How to use ASP.NET Bundling and Minifications in Umbraco

Using the ASP.NET bundling and minifications is pretty straight forward, but here is a small guide that take care of a few gotchas when implementing bundles in your Umbraco project.

Installing ASP.NET Bundling and Minifications

ASP.NET Bundling and Minifications is part of the Microsoft ASP.NET Web Optimization Framework and is installed via NuGet;

PM> Install-Package Microsoft.AspNet.Web.Optimization

Once this is done, you need to create a BundleConfig.cs in your App_Start1 folder. This is where you register your different bundles. It can be extremely simple, or it can be more complex, but the gist of it is this;

@Lobstrosity
Lobstrosity / 1.Widget.cs
Created August 9, 2011 00:13
Mapping Parent-Child Relationships with Dapper
public class Widget
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}