public ResponseFJGet FJGet(RequestFJGet request) { ResponseFJGet response = new ResponseFJGet(); using (cnn = GetConnection()) { var ts = cnn.BeginTransaction(); try { var user = UserInfoGet(request.Token, ts); var data = cnn.QuerySingle <TKS_FAS_Attachment>("select * from TKS_FAS_Attachment where id=@Id", new { Id = request.Data.Id }, ts); ts.Commit(); response.IsSuccess = true; response.Message = "加载完毕"; response.Data = data; return(response); } catch (Exception ex) { ts.Rollback(); return(this.DealException(response, ex) as ResponseFJGet); } } }
public ResponseFJGet FJGet([FromBody] RequestFJGet request) { try { FJBLL bll = new FJBLL(); return(bll.FJGet(request)); } catch (Exception ex) { throw new HttpResponseException( Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }