public override object Clone() { var index = new DBIndex() { Name = name, Unique = Unique }; foreach (var column in Columns) { index.Columns.Add(column.Clone()); } return index; }
public DBIndex Generate() { if (Index != null) { return(Index); } Index = new DBIndex() { Name = IndexName, Unique = Attribute.Unique, Table = Table.Table }; foreach (var column in Columns) { Index.Columns.Add(column.Column); } Table.Table.Indexes.Add(Index); return(Index); }