Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example model binding
namespace Mvc.Examples
{
public class SomeController : Controller
{
public IActionResult Post([FromBody]MyModel model)
{
// Do something with `model` here
}
}
public class MyModel
{
public int Id { get; set; }
public string SomeProperty { get; set; }
// etc.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.