Skip to content

Instantly share code, notes, and snippets.

@smaglio81
Created June 12, 2020 05:34
Show Gist options
  • Save smaglio81/3f15064012de7ebfcb45ff87772ea000 to your computer and use it in GitHub Desktop.
Save smaglio81/3f15064012de7ebfcb45ff87772ea000 to your computer and use it in GitHub Desktop.
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace YourNamespace
{
[ApiController]
[Route("[controller]")]
public class YourController : ControllerBase
{
private readonly ILogger<YourController> _logger;
public PullRequestUpdatedController(
ILogger<YourController> logger
)
{
_logger = logger;
}
[TrackRequestBody]
public async Task<IActionResult> PostAsync([FromBody] YourObjectModel model)
{
// do stuff
return Ok();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment