On Jan 10, 4:37 pm, Toby Johnson <[email protected]> wrote: > I am using DbMetal with the --sprocs option to generate methods from > Stored Procedures but I see that this returns DataSets and not Linq > objects. I have found this workaround: > > http://groups.google.com/group/dblinq/browse_thread/thread/100b872655... > > which suggests calling the SP with ExecuteQuery<T> and set T to the > desired return type. Unfortunately in this case the DataReader is > still open when looping through the results so making additional > database calls is not possible.
So this is pretty much the solution I ended up using, and just create a strongly-typed List of whatever my desired return-type is. I've hacked together a Perl script that reads in a list of Sproc-to- type mappings, then goes through the generated file and replaces the sproc methods with a call to this method, using the appropriate return type and parameters. So, if I actually modified the DbLinq sources to do this instead (say, add a command-line parameter to accept a sproc-to-type mapping file name, then use that to generate the sproc methods), would such a patch be considered for inclusion? Toby
-- You received this message because you are subscribed to the Google Groups "DbLinq" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/dblinq?hl=en.
