Commit 36f51540 authored by Marc Gravell's avatar Marc Gravell
parent 6950c694
......@@ -409,7 +409,9 @@ static SqlMapper()
typeMap[typeof(TimeSpan?)] = DbType.Time;
typeMap[typeof(Object)] = DbType.Object;
}
/// <summary>
/// Configire the specified type to be mapped to a given db-type
/// </summary>
public static void AddTypeMap(Type type, DbType dbType)
{
typeMap[type] = dbType;
......
using System;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Linq;
......@@ -120,7 +120,7 @@ public void Run(int iterations)
var entityContext5 = new EntityFramework.tempdbEntities1();
entityContext5.Connection.Open();
entityContext5.Posts.MergeOption = System.Data.Objects.MergeOption.NoTracking;
tests.Add(id => entityContext.Posts.First(p => p.Id == id), "Entity framework No Tracking");
tests.Add(id => entityContext5.Posts.First(p => p.Id == id), "Entity framework No Tracking");
var mapperConnection = Program.GetOpenConnection();
tests.Add(id => mapperConnection.Query<Post>("select * from Posts where Id = @Id", new { Id = id }, buffered: true).First(), "Mapper Query (buffered)");
......@@ -128,7 +128,7 @@ public void Run(int iterations)
var mapperConnection2 = Program.GetOpenConnection();
tests.Add(id => mapperConnection2.Query("select * from Posts where Id = @Id", new { Id = id }, buffered: true).First(), "Dynamic Mapper Query (buffered)");
tests.Add(id => mapperConnection2.Query("select * from Posts where Id = @Id", new { Id = id }, buffered: true).First(), "Dynamic Mapper Query (non-buffered)");
tests.Add(id => mapperConnection2.Query("select * from Posts where Id = @Id", new { Id = id }, buffered: false).First(), "Dynamic Mapper Query (non-buffered)");
// dapper.contrib
var mapperConnection3 = Program.GetOpenConnection();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment