Example #1
0
 public void WasDeleted(int surr1)
 {
     if (source.Contains1(surr1))
     {
         throw ForeignKeyViolation(surr1);
     }
 }
Example #2
0
        public void Check()
        {
            int count = source.insertCount;

            if (count > 0)
            {
                int[] inserts = source.insertList;
                for (int i = 0; i < count; i++)
                {
                    if (!target.Contains1(inserts[i]))
                    {
                        throw ForeignKeyViolation(inserts[i]);
                    }
                }
            }

            target.CheckDeletes123(this);
        }