ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Curylo" <cury...@asme.org>
Subject Re: QueryForDictionary<K,V>, do I really have to creae a class for this?
Date Thu, 06 May 2010 21:02:07 GMT
Can you include a snippet of your code?  QueryForDictionary should do what you described without
the need to create a new class.


From: tech fan 
Sent: Thursday, May 06, 2010 4:26 PM
To: user-cs@ibatis.apache.org 
Subject: QueryForDictionary<K,V>, do I really have to creae a class for this?


Hi,

I have a table with just a integer as pk and a string as description. I need to retrieve all
data into a IDictionary<int, string>(this table is human mantained), but I really don't
want to creaet a class just for this simple task. But it seems QueryForDictionary converts
the result to an object before I can access it. Is there any solution to this? I tried to
use set the result class to System.Collections.Generic.Dictionary`2[System.UInt16,System.String]
with no luck.

Thanks a have a nice day.
tc.
Mime
View raw message