基本准备 首先,新建一个ASP.NET MVC 3的空项目. 然后新增一个Model,代码如下: using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Web; namespace MVCApplication.Models { public class Appointment { public str