如何返回List< dynamic>与Dapper.NET ORM可以绑定吗?
问题描述:
这个问题已经很老了,Dapper数据视图绑定已修复,如下所示:)
答
我已将基于 TypeDescriptor
的绑定添加到 DapperRow
,这意味着任何通过 Query()(动态
API)现在应该绑定到许多常见的UI控件。来自 1.60.5 或更高版本的任何文件都应起作用。
I've added TypeDescriptor
-based bindings to DapperRow
, which means that anything obtained via Query()
(the dynamic
API) should now bind to much common UI controls. Anything from 1.60.5 or above should work.
让我知道!
注意:目前无效适用于空结果(零行) 。我知道如何实现(请参见 ),但这将需要对我尚未完成的查询实现进行一些其他更改。
Caveat: it doesn't currently work for empty results (zero rows). I know how to implement that (see notes here), but that would require some additional changes to the query implementation that I have not done as-yet.