/// <summary> /// 修改关于 /// </summary> /// <param name="content">修改的内容</param> /// <returns></returns> public ActionResult ModifyAbout(string content) { try { Blog_About about = AboutRepository.GetByKey(1); about.Contents = content; AboutRepository.Update(about); return(DataProcess.Success().ToMvcJson()); } catch (Exception ex) { return(DataProcess.Failure(ex.Message).ToMvcJson()); } }
/// <summary> /// 加载关于 /// </summary> /// <returns></returns> public ActionResult LoadAbout() { try { Blog_About about = Abouts.FirstOrDefault(); if (about != null) { return(DataProcess.Success(about).ToMvcJson()); } else { return(DataProcess.Failure("没有内容").ToMvcJson()); } } catch (Exception ex) { return(DataProcess.Failure(ex.Message).ToMvcJson()); } }