Skip to content

Instantly share code, notes, and snippets.

@KennethanCeyer
Created January 2, 2018 05:23
Show Gist options
  • Save KennethanCeyer/d9ff8f7aa09e25f48ec924fa02b983a2 to your computer and use it in GitHub Desktop.
Save KennethanCeyer/d9ff8f7aa09e25f48ec924fa02b983a2 to your computer and use it in GitHub Desktop.
parameter binding with model
public class TestBModel
{
public string a { get; set; }
public string b { get; set; }
}
[HttpPost]
public void TestB(
TestBModel model
)
{
Debug.WriteLine($"a: {model.a}, b: {model.b}");
}
@KennethanCeyer
Copy link
Author

KennethanCeyer commented Jan 2, 2018

request

a: 1
b: 2

output

a: 1, b: 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment