Skip to content

Instantly share code, notes, and snippets.

@KennethanCeyer
Created January 2, 2018 05:31
Show Gist options
  • Save KennethanCeyer/7ee920c24f2942f2c836b6334b0d61e9 to your computer and use it in GitHub Desktop.
Save KennethanCeyer/7ee920c24f2942f2c836b6334b0d61e9 to your computer and use it in GitHub Desktop.
parameter binding with pascal naming model
public class TestCModel
{
public string A { get; set; }
public string B { get; set; }
}
[HttpPost]
public void TestC(
TestCModel 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