I have a number of classes that represents business transaction calls: executing appropriate stored procedures.
Now the looks like this:
public static class Request
{
public static void Approve(..) {
using(connection) {
command.Text = "EXEC [Approve] ,,"]
command.ExecuteNonQuery();
}
}
}
And I want to make them more thread-safe:
public class Request {
public static void Approve(..) {
new Request().Approve(..);
}
internal void Approve(..) {
using(connection) {
command.Text = "EXEC [Approve] ,,"]
command.ExecuteNonQuery();
}
}
}
But getting next error message:
The call is ambiguous between the following methods or properties: 'MyNamespace.Request.Approve(..)' and 'MyNamespace.Request.Approve(..)'
How can I force, mark that I'm calling non-static, instance method from static?
Or I cannot do that without renaming one of the methods? Or moving static method to another class, etc