playing with new api

This commit is contained in:
Sam Saffron
2011-04-23 10:59:32 +10:00
parent 5aeded6a06
commit ca2e42f18f
2 changed files with 22 additions and 0 deletions
+5
View File
@@ -217,6 +217,11 @@ namespace Dapper
return rval;
}
public static List<T> ExecuteMapperQuery<T,U>(this IDbConnection cnn, string sql, Action<T,U> map, object param = null, IDbTransaction transaction = null)
{
return null;
}
private static Func<IDataReader, T> GetDeserializer<T>(Identity identity, IDataReader reader)
{
object oDeserializer;
+17
View File
@@ -237,5 +237,22 @@ namespace SqlMapper
gotException.IsTrue();
}
class User
{
public int Id { get; set; }
public string Name { get; set; }
}
class Post
{
public int Id { get; set; }
public User Owner { get; set; }
public string Content { get; set; }
}
public void TestMultiMap()
{
var test = connection.ExecuteMapperQuery<Post, User>("select * from Posts p left join Users u on u.Id = p.OwnerId");
}
}
}