4

I am trying to use dapper.net against a legacy database, some of the stored procedures return results with multiple columns of the same name, but different data types.

The existing code simply ignores the name of the column and uses the column index on the result.

Is this possible using Dapper?

ilivewithian
  • 19,476
  • 19
  • 103
  • 165
  • 2
    no support for this in dapper, you could easily amend `GetDynamicDeserializer` to support this, or do an `insert ... exec` into a table var and select from it. – Sam Saffron Jan 26 '12 at 03:27
  • possible duplicate of [Is there a way to access the columns in a Dapper FastExpando via string or index?](http://stackoverflow.com/questions/6168799/is-there-a-way-to-access-the-columns-in-a-dapper-fastexpando-via-string-or-index) – David McClelland Aug 04 '14 at 22:05
  • The result returned by Dapper implements IDictionary, so I used that to access individual colums by index: http://stackoverflow.com/a/25128281/35133 – David McClelland Aug 04 '14 at 22:07

0 Answers0