Skip to content

Instantly share code, notes, and snippets.

@geoffreysmith
geoffreysmith / gist:923505
Created April 16, 2011 21:18
ModelBinder
Could not load type 'System.Func`2' from assembly 'SharpArch, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'System.Func`2' from assembly 'SharpArch, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
@geoffreysmith
geoffreysmith / gist:923501
Created April 16, 2011 21:09
AddCustomRepositoriesTo(container);
Could not load type 'System.Func`2' from assembly 'SharpArch, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'System.Func`2' from assembly 'SharpArch, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
@geoffreysmith
geoffreysmith / MvcScaffolding.Controller.ps1
Created April 10, 2011 14:48
Got rid of dbcontext, plural controller/view names
[T4Scaffolding.ControllerScaffolder("Controller with read/write action and views, using EF data access code", Description = "Adds an ASP.NET MVC controller with views and data access code", SupportsModelType = $true, SupportsDataContextType = $true, SupportsViewScaffolder = $true)][CmdletBinding()]
param(
[parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)][string]$ControllerName,
[string]$ModelType,
[string]$Project,
[string]$CodeLanguage,
[string]$DbContextType,
[string]$Area,
[string]$ViewScaffolder = "View",
[alias("MasterPage")][string]$Layout,
@geoffreysmith
geoffreysmith / ControllerWithContext.cs.t4
Created April 10, 2011 14:35
Sharpified controller
<#@ template language="C#" HostSpecific="True" inherits="DynamicTransform" #>
<#@ Output Extension="cs" #>
<#@ import namespace="System.Collections" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text.RegularExpressions" #>
<#@ import namespace="EnvDTE" #>
namespace <#= Model.ControllerNamespace #>
{