示例#1
0
        public static void SaveGameData(GameViewModel update)
        {
            if (update == null)
                return;

            //GetDataBase();
            using (GameDataContext context = new GameDataContext(Constants.DBConnectionString))
            {
                IQueryable<GameData> query = from g in context.Games
                                             where g.ID == update.ID
                                             select g;
                GameData game = query.FirstOrDefault();

                if (game != null)
                {
                    game.Description = update.Description;
                    game.Notes = update.Notes;
                    context.SubmitChanges();
                }

            }
        }
示例#2
0
 public void SaveGameData(GameViewModel update)
 {
     DatabaseFunctions.SaveGameData(update);
 }