Exemple #1
0
 public IActionResult Select(int id)
 {
     try
     {
         //return Ok(_repository.Get(p => p.Id == id));
         return(Json(new
         {
             table = _repository.Single(id),
             state = "0",
             msg = "操作成功!"
         }));
     }
     catch (Exception ex)
     {
         return(Json(new {
             state = "-1",
             msg = "非法操作!"
         }));
     }
 }