I am getting code analysis error in the below method.
public static OracleCommand CreateStoredProcedureCommand(string name,
OracleConnection connection)
{
return new OracleCommand(name, connection) { CommandType = CommandType.StoredProcedure };
}
CA2000 : Microsoft.Reliability : In method 'StoredProcedureHelper.CreateStoredProcedureCommand(string, OracleConnection)', object 'command' is not disposed along all exception paths. Call System.IDisposable.Dispose on object 'command' before all references to it are out of scope
how can it this be resolved without suppressing this?