Should I have a separate method for Update(), Insert(), etc., or have a generic Query() that would be able to handle all of these?
- by Prayos
I'm currently trying to write a class library for a connection to a database. Looking over it, there are several different types of queries: Select From, Update, Insert, etc.
My question is, what is the best practice for writing these queries in a C# application?
Should I have a separate method for each of them(i.e. Update(), Insert()), or have a generic Query() that would be able to handle all of these? Thanks for any and all help!