Exemplo n.º 1
0
        public void AddScore(string username, double score)
        {
            DateTime  date = DateTime.Now;
            HighScore obj  = new HighScore();

            obj.UserName  = username;
            obj.BestScore = Math.Round(score);
            obj.Date      = date;

            try
            {
                dbContext.GetTable <HighScore>().InsertOnSubmit(obj);
                dbContext.SubmitChanges();
                Console.WriteLine("Submitted: " + username + " " + score + " " + date);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
Exemplo n.º 2
0
 partial void UpdateHighScore(HighScore instance);
Exemplo n.º 3
0
 partial void DeleteHighScore(HighScore instance);
Exemplo n.º 4
0
 partial void InsertHighScore(HighScore instance);