Пример #1
0
 public string Add(Form obj)
 {
     try
     {
         _app.Add(obj);
     }
     catch (Exception ex)
     {
         Result.Code    = 500;
         Result.Message = ex.InnerException?.Message ?? ex.Message;
     }
     return(JsonHelper.Instance.Serialize(Result));
 }
Пример #2
0
        public Response Add(Form obj)
        {
            var result = new Response();

            try {
                _app.Add(obj);
            } catch (Exception ex) {
                result.Code    = 500;
                result.Message = ex.InnerException?.Message ?? ex.Message;
            }

            return(result);
        }