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