What can be improved in my code:
using (var oracleConnection = new OracleConnection(ConnectionString))
{
using (var oracleCommand = oracleConnection.CreateCommand())
{
oracleConnection.Open();
oracleCommand.CommandText =
"SELECT *
FROM table_sample Table_Sample
WHERE table_sample.id > 1000";
using (var reader = oracleCommand.ExecuteReader())
{
while (reader.Read())
{
int id = reader.GetValue(0);
}
}
}
}
As the most "dangerous" thing I see the ugly string statement for database query.
I dont want to use Entity Framework for Oracle - cause its not as actual as one for MS SQL Server. And also some Oracle features are not supported.