先定义一个Model类Student namespace Lession.Models { public class Student { public string Name { get; set; } public int Age { get; set; } public string Sex { get; set; } } } 控制器如下: using Lession.Models; using Microsoft.AspNetCore.Mvc; namespace Lession.Cont