I am writing a code to use postgres database. This code already using oracle specific functions and I added some function to access the postgres tables. It is required to make build that will use only postgres functionality and no need of oracle line of code and hence no need of ODAC.
http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
There are options like adding conditional compilation for c# so not to execute the oracle specific code for postgres. Doing so will not add the ODAC based code part in the compiled dlls and hence no need of ODAC but is this the only way. As i said there are lot of projects in the Application and doing conditional compilation will create a lot of extra code.
Or what could be other alternatives to avoid the ODAC licensing.
Thanks,
function GetData()
{
if(Postgres flag){
// code for using OracleClientFactory and initlizing the oraclecommand
}
else if(Oracle flag)
{
// code for using postgres and initlizing the its command object
}
}
// code to assign query to command object and execute the query
// return the resluts
catch (){}
finally{//dispoing the objects}
}
}