Пример #1
0
        public JsonResult GetList()
        {
            var jsonSuccessResult = new JsonSuccessResult();

            try
            {
                var list = Emails.GetList();

                jsonSuccessResult.Success = true;
                jsonSuccessResult.Data    = list;
            }
            catch (Exception ex)
            {
                jsonSuccessResult.Errors  = new string[] { ex.Message };
                jsonSuccessResult.Success = false;
            }

            return(new JsonResult()
            {
                Data = jsonSuccessResult
            });
        }