Exemple #1
0
 public override void Insert(BaseEntity entity)
 {
     if (entity is User)
     {
         Inserted.Add(new ChangeEntity(CreateInsertSql, entity));
     }
 }
Exemple #2
0
 private void EnumerateInsertedRecords(Dbf original, Dbf modified)
 {
     for (int i = original.Records.Count; i < modified.Records.Count; i++)
     {
         Inserted.Add(modified.Records[i]);
     }
 }
Exemple #3
0
        public override void Insert(BaseEntity entity)
        {
            Player p = entity as Player;

            if (p != null)
            {
                Inserted.Add(new ChangeEntity(CreateInsertSql, entity));
            }
        }
Exemple #4
0
 public override void Insert(BaseEntity baseEntity)
 {
     if (baseEntity is Friendship)
     {
         if (((Friendship)baseEntity).User1 != null && ((Friendship)baseEntity).User2 != null)
         {
             Inserted.Add(new ChangeEntity(CreateInsertSql, baseEntity));
         }
     }
 }
Exemple #5
0
        public void InsertList(ConnectionList entity)
        {
            ConnectionList cl = entity;

            foreach (var playerCardConnection in cl)
            {
                if (playerCardConnection != null)
                {
                    Inserted.Add(new ChangeEntity(CreateInsertSql, playerCardConnection));
                }
            }
        }
Exemple #6
0
        public void InsertList(PlayerList entity)
        {
            PlayerList pl = entity;

            foreach (var player in pl)
            {
                if (player != null)
                {
                    Inserted.Add(new ChangeEntity(CreateInsertSql, player));
                }
            }
        }
Exemple #7
0
 public void Insert(Game game)
 {
     //Inserted.Add(new ChangeEntity(CreateInsertSql, game));
     foreach (Player p in game.Players)
     {
         Inserted.Add(new ChangeEntity(CreateInsertSql, new PlayerGameConnection()
         {
             Player = p,   // increment the player id for each player
             Game   = game // the game id will be the same when inserted
         }));
     }
 }
Exemple #8
0
 public void Insert(Game game)
 {
     foreach (Player p in game.Players)
     {
         foreach (Card c in p.Hand)
         {
             Inserted.Add(new ChangeEntity(CreateInsertSql, new PlayerCardConnection()
             {
                 Player = p,
                 Card   = c
             }));
         }
     }
 }