예제 #1
0
        public VA_Handle GetNewSign(string VID, string ContentID)
        {
            VA_Handle res = new VA_Handle();
            //查询条件
            var predicate = WhereExtension.True <VA_Handle>();//初始化where表达式

            if (!String.IsNullOrEmpty(VID))
            {
                predicate = predicate.And(p => p.VID.Equals(VID));
            }
            if (!String.IsNullOrEmpty(ContentID))
            {
                predicate = predicate.And(p => p.ContentID.Equals(ContentID));
            }
            var result = DbSet.Where(predicate).OrderByDescending(o => o.CreateDate).ToList();

            if (result.Count > 0)
            {
                res = result.First();
            }
            return(res);
        }
예제 #2
0
 public virtual void Update(VA_Handle obj)
 {
     DbSet.Update(obj);
 }
예제 #3
0
 public virtual void Add(VA_Handle obj)
 {
     DbSet.Add(obj);
 }