DbMigration.AlterTableAnnotations<TColumns> Method

Definition

Adds an operation to handle changes in the annotations defined on tables.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
protected internal void AlterTableAnnotations<TColumns> (string name, Func<System.Data.Entity.Migrations.Builders.ColumnBuilder,TColumns> columnsAction, System.Collections.Generic.IDictionary<string,System.Data.Entity.Infrastructure.Annotations.AnnotationValues> annotations, object anonymousArguments = null);
member this.AlterTableAnnotations : string * Func<System.Data.Entity.Migrations.Builders.ColumnBuilder, 'Columns> * System.Collections.Generic.IDictionary<string, System.Data.Entity.Infrastructure.Annotations.AnnotationValues> * obj -> unit
Protected Friend Sub AlterTableAnnotations(Of TColumns) (name As String, columnsAction As Func(Of ColumnBuilder, TColumns), annotations As IDictionary(Of String, AnnotationValues), Optional anonymousArguments As Object = null)

Type Parameters

TColumns

The columns in this operation. You do not need to specify this type, it will be inferred from the columnsAction parameter you supply.

Parameters

name
String

The name of the table. Schema name is optional, if no schema is specified then dbo is assumed.

columnsAction
Func<ColumnBuilder,TColumns>

An action that specifies the columns to be included in the table. i.e. t => new { Id = t.Int(identity: true), Name = t.String() }

annotations
IDictionary<String,AnnotationValues>

The custom annotations on the table that have changed.

anonymousArguments
Object

Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.

Attributes

Applies to