public override IEnumerable <IAnnotation> For(ITableIndex index) { var baseAnnotations = base.For(index); var customAnnotations = index.GetAnnotations().Where(a => a.Name == IndexExtensions.ColumnStoreIndexAnnotationName); return(baseAnnotations.Concat(customAnnotations)); }
/// <summary> /// Creates a new <see cref="CreateIndexOperation" /> from the specified index. /// </summary> /// <param name="index"> The index. </param> /// <returns> The operation. </returns> public static CreateIndexOperation CreateFrom(ITableIndex index) { Check.NotNull(index, nameof(index)); var operation = new CreateIndexOperation { IsUnique = index.IsUnique, Name = index.Name, Schema = index.Table.Schema, Table = index.Table.Name, Columns = index.Columns.Select(p => p.Name).ToArray(), Filter = index.Filter }; operation.AddAnnotations(index.GetAnnotations()); return(operation); }