- Let's see how nested types are handled by ModelBinding:
public class Product{ public int Id { get; set; } public int Name { get; set; } public decimal Price { get; set; } public Category Category { get; set; }}public class Category{ public int Id { get; set; } public int Name { get; set; }}@model R2.Models.Product<form asp-action="Create" method="post"> <div class="form-group"> <label asp-for="Id"></label> <input asp-for="Id" class="form-control" /> </div> <div class="form-group"> <label asp-for="Name"></label> <input asp-for="Name" class="form-control" /> </div> <div class="form-group"> <label asp-for="Price"></label> <input asp-for="Price" class="form-control" /> </div> <div class="form-group"> <label asp-for