You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to support Oracle database and I cannot seem to be table to override the ExecuteQueryAsync method in OracleQueryExecutor. cs
Class definition: public class OracleQueryExecutor : QueryExecutor
public override async Task<TResult?> ExecuteQueryAsync<TResult>(
string sqltext,
IDictionary<string, DbConnectionParam> parameters,
Func<DbDataReader, List<string>?, Task<TResult>>? dataReaderHandler,
string dataSourceName,
HttpContext? httpContext = null,
List<string>? args = null)
{
// Execute Oracle specific queries if not call base.
TResult? result = await base.ExecuteQueryAsync(
sqltext,
parameters,
dataReaderHandler,
dataSourceName,
httpContext,
args);
return result;
}
I get this error
'OracleQueryExecutor.ExecuteQueryAsync(string, IDictionary<string, DbConnectionParam>, Func<DbDataReader, List?, Task>?, string, HttpContext?, List?)': return type must be 'Task<TResult?>' to match overridden member 'QueryExecutor.ExecuteQueryAsync(string, IDictionary<string, DbConnectionParam>, Func<DbDataReader, List?, Task>?, string, HttpContext?, List?)'
Tried this as well
public override async Task<TResult?> ExecuteQueryAsync(
string sqltext,
IDictionary<string, DbConnectionParam> parameters,
Func<DbDataReader, List?, Task>? dataReaderHandler,
string dataSourceName,
HttpContext? httpContext = null,
List? args = null)
{
TResult? result = default(TResult);
return result;
}
Got this error
Cannot implicitly convert type 'TResult' to 'TResult?'. An explicit conversion exists (are you missing a cast?)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to support Oracle database and I cannot seem to be table to override the ExecuteQueryAsync method in OracleQueryExecutor. cs
Class definition: public class OracleQueryExecutor : QueryExecutor
I get this error
'OracleQueryExecutor.ExecuteQueryAsync(string, IDictionary<string, DbConnectionParam>, Func<DbDataReader, List?, Task>?, string, HttpContext?, List?)': return type must be 'Task<TResult?>' to match overridden member 'QueryExecutor.ExecuteQueryAsync(string, IDictionary<string, DbConnectionParam>, Func<DbDataReader, List?, Task>?, string, HttpContext?, List?)'
Tried this as well
public override async Task<TResult?> ExecuteQueryAsync(
string sqltext,
IDictionary<string, DbConnectionParam> parameters,
Func<DbDataReader, List?, Task>? dataReaderHandler,
string dataSourceName,
HttpContext? httpContext = null,
List? args = null)
{
TResult? result = default(TResult);
Got this error
Cannot implicitly convert type 'TResult' to 'TResult?'. An explicit conversion exists (are you missing a cast?)
Beta Was this translation helpful? Give feedback.
All reactions