Exemplo n.º 1
0
 // [ValidateAntiForgeryToken]
 public IActionResult HandleCreate([FromForm] Post p)
 {
     posts.Create(p);
     return(RedirectToAction("ReadFive"));
 }
 // [ValidateAntiForgeryToken]
 public IActionResult Create([FromBody] Post p)
 {
     posts.Create(p);
     return(Ok(posts));
 }