I have 2 http GET APIs in my controller class which have the same rout but different complex type parameters as follows:
[httpGet]
[Route("info")]
public async Task<IActionResult> GetinfoA(A classAobj){...}
[httpGet]
[Route("info")]
public async Task<IActionResult> GetinfoB(B classBobj){...}
------------------
class A{
string prop1{get;set;}
string prop2{get;set;}
}
class B{
string prop3{get;set;}
string prop4{get;set;}
}
What I am looking for is to match actions based on the name of class properties for example if query has the parameter prop3 action GetinfoB should be matched and if it has parameter prop1 GetinfoA should be matched. currently I am getting ambiguty error for my requests like /info?prop1="bla"