예제 #1
0
 public override object Clone()
 {
     var index = new DBIndex()
     {
         Name = name,
         Unique = Unique
     };
     foreach (var column in Columns)
     {
         index.Columns.Add(column.Clone());
     }
     return index;
 }
예제 #2
0
 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);
 }