mirror of
https://github.com/DapperLib/Dapper.git
synced 2026-10-29 05:10:10 +08:00
playing with new api
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user