Ejemplo n.º 1
0
        /// <summary>
        /// 加入收藏商品
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="goodid"></param>
        /// <returns></returns>
        public List <GoodListOutput> IntoCollect(string userid, string goodid)
        {
            var mod = new GoodCollect()
            {
                IsDelect   = true,
                CreateTime = DateTime.Now,
                GoodId     = goodid,
                UserId     = userid,
            };

            EF.GoodCollects.Add(mod);
            if (EF.SaveChanges() > 0)
            {
                return(_per.GetCollect(userid));
            }
            return(null);
        }