Beispiel #1
0
 public static void Delete(ossContext context, string sid)
 {
     lock (LockMe)
     {
         var entity = SessionDal.Get(context, sid);
         SessionDal.Delete(context, entity);
     }
 }
Beispiel #2
0
        private static List <Models.Session> Purge(ossContext model)
        {
            var entities = SessionDal.Read(model);
            var most     = DateTime.Now;
            var result   = new List <Models.Session>();

            foreach (var entity in entities)
            {
                if (entity.Ervenyes <= most)
                {
                    SessionDal.Delete(model, entity);
                }
                else
                {
                    result.Add(entity);
                }
            }

            return(result);
        }