public IActionResult Add([FromBody] CameraTable _camera) { try { //return Ok(_repository.SaveGetId(_camera)); int id = _repository.SaveGetId(_camera); return(Json(new { id, state = "0", msg = "添加成功!" })); } catch (Exception ex) { return(Json(new { state = "-1", msg = "非法操作!" })); } }