Skip to content

Instantly share code, notes, and snippets.

@conectado
Created January 24, 2018 02:03
Show Gist options
  • Select an option

  • Save conectado/4bf5759a92a196cf289bf79ccb22f7a9 to your computer and use it in GitHub Desktop.

Select an option

Save conectado/4bf5759a92a196cf289bf79ccb22f7a9 to your computer and use it in GitHub Desktop.
//It will only match on POST requests
public async Task<IActionResult> Create([Bind("ID,Name,Mail,Company,Complain")]yourComplaint.Models.Complaint complaint)
{
_context.Add(complaint);
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment