public void DeleteSession() { using (JolTudomEEntities ent = new JolTudomEEntities()) { ent.Attach(_Session); ent.Sessions.DeleteObject(_Session); ent.SaveChanges(); } }
public void UpdateSessionLastAction() { using (JolTudomEEntities ent = new JolTudomEEntities()) { ent.Attach(_Session); _Session.LastAction = DateTime.UtcNow; ent.SaveChanges(); } }