//通过service获取model public JsonResult Index(int id = 0, string name = "") { var model = _service.GetGreetings(id, name); return(Json(model)); }