install the required
Microsoft.SqlServer.Types assembly; they are not installed by default, and are available from Microsoft here as "Microsoft® System CLR Types for Microsoft® SQL Server® 2012" - note that there are separate installers for x86 and x64.
Dapper.EntityFramework (or the strong-named equivalent); this could be done via the IDE's "Manage NuGet Packages..." UI, or (at the Package Manager Console):
add the required assembly binding redirects; this is because Microsoft ships v11 of the assemblies, but Entity Framework asks for v10; you can add the following to
web.config under the
<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" /> <bindingRedirect oldVersion="10.0.0.0" newVersion="184.108.40.206" /> </dependentAssembly> </assemblyBinding> </runtime>
tell "dapper" about the new type handlers available, by adding (somewhere in your startup, before it tries using the database):