Beispiel #1
0
        protected virtual void AddClicked(object sender, EventArgs e)
        {
            UniqueConstraintSchema uni = schemaProvider.CreateUniqueConstraintSchema(string.Concat(table.Name,
                                                                                                   "_",
                                                                                                   "uni_new"));
            int index = 1;

            while (constraints.Contains(uni.Name))
            {
                uni.Name = string.Concat(table.Name, "_", "uni_new", (index++).ToString());
            }
            constraints.Add(uni);
            AddConstraint(uni);
            EmitContentChanged();
        }