private const int CACHETIMEOUT = 0;//缓存30分钟 #region == Edit OR Add == /// <summary> /// 添加或编辑 /// </summary> /// <param name="model"></param> /// <returns></returns> public static int Create(ArticleInfo model) { if (model.Id > 0) { //Update ArticleManage.Update(model); } else { int i = ArticleManage.Insert(model); model.Id = i; } //Insert ArticleTag string[] tags = model.Tags.Split(new char[] { ',' }); if (tags.Length > 0) { ArticleManage.InsertTags(model.Id, tags); } return(model.Id); }