这是我用来尝试显示数据的代码
private void btnScript1_Click_1(object sender, EventArgs e)
{
IEnumerable<dynamic> queryResults;
using (var uow = new repoUow())
{
queryResults = DapperAccess.ImporterQuery(uow);
}
dgScript1.DataSource = queryResults;
}
这就是Dapper发送的内容:
public static IEnumerable<dynamic> ImporterQuery(IRepoUow uow)
{
string sql = @"SELECT * FROM [accp].[Account]";
var rsult = uow.Connection.Query(sql, null, uow.Transaction);
return rsult;
}