public class PersonModel { public string FirstName { get; set; } }
public class PersonModel { public int Age { get; set; } = 0; }
public IActionResult Add([Bind("FirstName","LastName")] PersonModel person) { //... }
上一篇:ASP.NETCoreMVC模型绑定不能与TempData一起使用
下一篇:ASP.NETCoreMVC模型不识别值更改