Dapper üzerinde tür dönüşümü

https://code.google.com/p/dapper-dot-net/


{DapperRow, billing_currency_code = 'USD', count(*) = '6'}

If the column name genuinely is "count(*)", then you can cast the row to a dictionary:
var data = (IDictionary<string,object>)row;
object value = data["count(*)"];
For that to work (at least, in SQL Server), your query would need to be something like:
select count(*) as [count(*)]
However, in most cases the column doesn't have a name, in which case: fix your query ;p
Actually, I'd probably say fix your query anyway; the following would be much easier to work with:
select count(*) as [Count]

Yorumlar

Bu blogdaki popüler yayınlar

22.06.2020 - 26.06.2020 arası işler

Asp.net RestSharp ile data post etmek

List Box Item içindeki elemanları aşağı veya yukarı taşımak