Beispiel #1
0
 public void DeleteSession() {
   using (JolTudomEEntities ent = new JolTudomEEntities()) {
     //ent.Attach(_Session);
     ent.Sessions.Remove(_Session);
     ent.Entry(_Session).State = System.Data.Entity.EntityState.Deleted;
     ent.SaveChanges();
   }
 }
Beispiel #2
0
 public void UpdateSessionLastAction() {
   using (JolTudomEEntities ent = new JolTudomEEntities()) {
     //ent.Attach(_Session);
     _Session.LastAction = DateTime.UtcNow;
     ent.Entry(_Session).State = System.Data.Entity.EntityState.Modified;
     ent.SaveChanges();
   }
 }