In my opinion one must always check if the property exists when using reflection. Now we will always get null-recerence exception when using AsyncPoco with Devart dotConnect for Oracle.
I can submit PR if you want.
Code should be:
public override void PreExecute(IDbCommand cmd)
{
var bbnProperty = cmd.GetType().GetProperty("BindByName");
if (bbnPropery != null)
{
bbnProperty.SetValue(cmd, true, null);
}
//see http://docs.oracle.com/html/A96160_01/features.htm#1048395
//if command does not have "InitialLONGFetchSize" property this code
// will not throw NullReferenceException
var ilfsProperty = cmd.GetType().GetProperty("InitialLONGFetchSize");
if (ilfsProperty != null)
{
ilfsProperty.SetValue(cmd, -1);
}
}
Introduced with PR #17.
In my opinion one must always check if the property exists when using reflection. Now we will always get null-recerence exception when using AsyncPoco with Devart dotConnect for Oracle.
I can submit PR if you want.
Code should be: