CSharpMigrationCodeGenerator.GenerateAnnotation Method (String, Object, IndentedTextWriter)
Generates code for the given annotation value, which may be null. The default behavior is to use an AnnotationCodeGenerator if one is registered, otherwise call ToString on the annotation value.
Assembly: EntityFramework (in EntityFramework.dll)
protected internal virtual void GenerateAnnotation( string name, object annotation, IndentedTextWriter writer )
Parameters
- name
-
Type:
System.String
The name of the annotation for which code is needed.
- annotation
-
Type:
System.Object
The annotation value to generate.
- writer
-
Type:
System.Data.Entity.Migrations.Utilities.IndentedTextWriter
The writer to which generated code should be written.
Note that a AnnotationCodeGenerator can be registered to generate code for custom annotations without the need to override the entire code generator.