We are creating a web API that is generated programmatically from a C# class. The class has a GetFooBar(int a, int b) method and the API has a GetFooBar method that takes query parameters like &a=foo &b=bar .
Classes must support optional parameters, which are not supported in the C# language. What is the best approach?
optional parameters since C# 4.0 work like this:
public void SomeMethod(int a, int b = 0) { //some code } where int b = 0 is an optional parameter.