public bool IsValid(Session session) { Repo <Session> sessionRepo = new SessionRepo(); Session res = sessionRepo.Read(session); return(res.Id > 0); }