Skip to content

Instantly share code, notes, and snippets.

AutoMap.AssemblyOf<...>(new BusinessModelAutomapping())
.Conventions.AddAssembly(Assembly.GetExecutingAssembly())
.UseOverridesFromAssembly(Assembly.GetExecutingAssembly())
.Alterations(a => a.AddFromAssembly(Assembly.GetExecutingAssembly()));
@ashmind
ashmind / MonoidsInCSharp.cs
Created March 11, 2011 23:15
Monoids in C# as I see them
public class Monoid<T> {
public T None { get; private set; }
public Func<T, T, T> Operation { get; private set; }
public Monoid(Func<T,T,T> operation, T none) {
this.Operation = operation;
this.None = none;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Compilation;
using System.Web.Mvc;
using System.Web.Razor;
using System.Web.WebPages.Razor;
[assembly: PreApplicationStartMethod(typeof(AshMind.Web.Mvc.Razor.RazorJavaScriptSupport), "SetupAll")]