Example #1
0
        /// <summary>
        /// 用户加入某版块(收藏)
        /// </summary>
        /// <param name="subSectionId"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        public int CollectSubSection(int subSectionId, int userId)
        {
            //验证
            var isin = IsInSection(subSectionId, userId);

            if (isin)
            {
                return(0);
            }
            var coll = new CollectSubSection();

            coll.SubSectionId = subSectionId;
            coll.UserId       = userId;
            coll.CollTime     = DateTime.Now;
            return(_dataAccess.AddEntity(coll));
        }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(CollectSubSection model)
 {
     return(_dataAccess.UpdateEntity(model) > 0);
 }
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(CollectSubSection model)
 {
     return(_dataAccess.AddEntity(model));
 }