public void AddSession(GameSession session)
 {
     using (var _gameStorage = new GameStorage("DefaultConnection"))
     {
         _gameStorage.Sessions.Add(session);
         _gameStorage.SaveChanges();
     }
 }
        public void CloseSession(Guid sessionId, int score)
        {
            using (var _gameStorage = new GameStorage("DefaultConnection"))
            {
                var session = _gameStorage.Sessions.FirstOrDefault(v => v.Id == sessionId);
                session.EndTime = DateTime.Now;
                session.Score   = score;

                _gameStorage.SaveChanges();
            }
        }
 public void Add(GameCharacter character)
 {
     _gameStorage.Characters.Add(character);
     _gameStorage.SaveChanges();
 }