[Route("api/[controller]")] public class CancelController : Controller { [HttpGet("get.{format}"), FormatFilter] public IEnumerable<BatchData> Get() { List<BatchData> cancel = new List<BatchData> { new BatchData { BatchNumber = "1"}, new BatchData { BatchNumber = "2"} }; return cancel; } [HttpPost("post.{format}"), FormatFilter] public BatchData Post([FromBody] BatchData cancel) { if (ModelState.IsValid) { return cancel; } else { return cancel; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)