I want to retrieve rows from an oracle table and convert them into objects.
I am currently using a refcursor result and a datareader in c# to manually convert the rows to objects but this seems messy. Is their a better way of converting rows from a relational table to objects?
EDIT: The project I’m on is not using any ORM tools so unfortunately it is down to little old me to do the mapping!
You can use UDTs and utilize the new ODP functionality to get the data.
this is a walkthrough on getting started:
http://www.oracle.com/technology/obe/hol08/dotnet/udt/udt_otn.htm
while this is a bit more detailed:
http://download.oracle.com/docs/html/E10927_01/featUDTs.htm
but the real meat & potatoes are already installed on your computer after you install ODP in the Samples directory:
%ORA_HOME%\product\11.1.0\client_1\odp.net\samples\2.x\UDT
Utilizing UDTs has helped out our origination and the time response is great.