public Response <string> Add(Resource obj) { var resp = new Response <string> (); try { _app.Add(obj); resp.Result = obj.Id; } catch (Exception e) { resp.Code = 500; resp.Message = e.Message; } return(resp); }
public string Add(Resource obj) { Response resp = new Response(); try { _app.Add(obj); } catch (Exception e) { resp.Code = 500; resp.Message = e.Message; } return(JsonHelper.Instance.Serialize(resp)); }
public Response<string> Add(AddOrUpdateResReq obj) { var resp = new Response<string>(); try { _app.Add(obj); resp.Result = obj.Id; } catch (Exception e) { resp.Code = 500; resp.Message = e.Message; } return resp; }