I know a little bit about Object Oriented design, but I\'m not sure how to go about using those principles in my code. Here\'s what I\'m working on:
pub
To write less code but improve readability the the level of declaritive code you can swith to a dictionary with delegates for each database. That can easily be extended and is very readable. With that more functional approach in mind you get something like
void Query(Agency agency, Citation queryCitation)
{
Dictionary> QueryMap = new Dictionary>
{
{ "SQL", QueryOracle},
{ "PIC", QueryPic}
};
queryCitation.AgencyCode = agency.AgencyCode;
QueryMap[agency.ClientDb.Type](agency, queryCitation);
}