public Task <IActionResult> Add(TaskInfo model) { return(Task.Factory.StartNew <IActionResult>(() => { if (!ModelState.IsValid) { return Json(ExcutedResult.FailedResult("数据验证失败")); } TaskInfoRepository.AddAsync(model, false); return Json(ExcutedResult.SuccessResult()); })); }