提交 ee9a0588 编写于 作者: S Sam Saffron

playing with new api

上级 bb3052fa
...@@ -217,6 +217,11 @@ public static List<T> ExecuteMapperQuery<T>(this IDbConnection cnn, string sql, ...@@ -217,6 +217,11 @@ public static List<T> ExecuteMapperQuery<T>(this IDbConnection cnn, string sql,
return rval; 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) private static Func<IDataReader, T> GetDeserializer<T>(Identity identity, IDataReader reader)
{ {
object oDeserializer; object oDeserializer;
......
...@@ -237,5 +237,22 @@ public void TestEnumerationDynamic() ...@@ -237,5 +237,22 @@ public void TestEnumerationDynamic()
gotException.IsTrue(); 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");
}
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册