I have an existing WebAPI controller method.
[SwaggerDefaultResponse]
[HttpGet, Route("{id:int}", Name = "GetDataId")]
public IHttpActionResult Get(long id)
{
//This method returns a full Data
}
I have to write granular WebAPI. We are planning to have a route like below:
/V1/MYdATA/{DataId}?DataBasic=true
If DataBasic=true
then I should invoke a new method to get "Basic Data" ---
and if DataBasic=false
then my existing Full data should be returned i.e. existing method should be invoked.
Can I get some idea for this as how to implement this in code?