In Visual Studio, how do I receive the agent's POST request to my service and how do I send the response?
Your going to have to set up some kind of IP tunneling system if you want a post from Dialogflow to show up in your local visual studio installation. Just set your dialog flow Fulfillment webhook to the tunneled endpoint. Something like ngrok.io should do the trick. Once you have things working you can deploy it to Azure and change the dialog flow Fulfillment webhook to target your azure web api.
how do I send the response?
Like you would any other web API set up
[HttpPost]
public IHttpActionResult GetProduct([FromBody] Request request)
{
// do something with request to build a proper response
var response = new ActionsResponse { ... }
return Ok(response );
}
You will of course need to set up the proper request and response formatted objects. You may also want to read up on how to create a web apiCreate a Web API with ASP.NET Core and Visual Studio for Windows