Execute sql statement and get datareader - WITH flow control

Posted by dotnetdev on Stack Overflow See other posts from Stack Overflow or by dotnetdev
Published on 2010-05-18T23:16:13Z Indexed on 2010/05/18 23:20 UTC
Read the original article Hit count: 180

Filed under:

I have a standard method which gets some data from SQL Server. I want to refactor this so that based on the value of an enum (passed as a method parameter), a different sql statement is executed (all return datareader).

I can't seem to code this in a way which is elegant and tidy. What would be a good way to do this?

Thanks

© Stack Overflow or respective owner

Related posts about c#