Esempio n. 1
0
        public void SpremiScore(string nick, int score)
        {
            // Create a new Order o;
            GeoQuizEntities CTX;

            CTX = new GeoQuizEntities();
            HighScore hig = new HighScore
            {
                Nick  = nick,
                Score = score
            };

            CTX.HighScore.Add(hig);


            // Submit the change to the database.
            try
            {
                CTX.SaveChanges();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                // Make some adjustments.
                // ...
                // Try again.
                CTX.SaveChanges();
            }
            //return "";
        }