Is there a way to use Dapper Dot Net for mapping only, without querying?

.net dapper orm

Question

I really like Dapper Dot Net's interface for mapping objects. However, I already have a mechanism for returning recordsets.

Is there a way that I could just pass a flat recordset over to Dapper's machinery and have it map to whichever objects I specify? In other words, I'd like it to serve as a replacement for things like ValueInjecter/Automapper.

Thanks!

Accepted Answer

Not in the existing API; however, the code is fully available if you want to do something different with it. I guess it largely depends on what you "recordsets" are; if thay are IDataReader, then it should just be a case of hoisting the reader code, and forgetting the parameterization/command code.




Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why