Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

CSharpMigrationCodeGenerator Class

Entity Framework 5.0

Generates C# code for a code-based migration.

System.Object
  System.Data.Entity.Migrations.Design.MigrationCodeGenerator
    System.Data.Entity.Migrations.Design.CSharpMigrationCodeGenerator

Namespace:  System.Data.Entity.Migrations.Design
Assembly:  EntityFramework (in EntityFramework.dll)
public class CSharpMigrationCodeGenerator : MigrationCodeGenerator

The CSharpMigrationCodeGenerator type exposes the following members.

  NameDescription
Public methodCSharpMigrationCodeGeneratorInitializes a new instance of the CSharpMigrationCodeGenerator class.
Top
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Protected methodGenerate(Byte)Generates code to specify the default value for a Byte column.
Protected methodGenerate(Byte[])Generates code to specify the default value for a Byte column.
Protected methodGenerate(DbGeography)Generates code to specify the default value for a DbGeography column.
Protected methodGenerate(DbGeometry)Generates code to specify the default value for a DbGeometry column.
Protected methodGenerate(DateTime)Generates code to specify the default value for a DateTime column.
Protected methodGenerate(DateTimeOffset)Generates code to specify the default value for a DateTimeOffset column.
Protected methodGenerate(Decimal)Generates code to specify the default value for a Decimal column.
Protected methodGenerate(Guid)Generates code to specify the default value for a Guid column.
Protected methodGenerate(Int64)Generates code to specify the default value for a Int64 column.
Protected methodGenerate(Object)Generates code to specify the default value for a column of unknown data type.
Protected methodGenerate(Single)Generates code to specify the default value for a Single column.
Protected methodGenerate(String)Generates code to specify the default value for a String column.
Protected methodGenerate(TimeSpan)Generates code to specify the default value for a TimeSpan column.
Protected methodGenerate(IEnumerable<String>, IndentedTextWriter)Generates code to specify a set of column names using a lambda expression.
Protected methodGenerate(AddColumnOperation, IndentedTextWriter)Generates code to perform an AddColumnOperation.
Protected methodGenerate(AddForeignKeyOperation, IndentedTextWriter)Generates code to perform an AddForeignKeyOperation.
Protected methodGenerate(AddPrimaryKeyOperation, IndentedTextWriter)Generates code to perform an AddPrimaryKeyOperation.
Protected methodGenerate(AlterColumnOperation, IndentedTextWriter)Generates code to perform an AlterColumnOperation.
Protected methodGenerate(CreateIndexOperation, IndentedTextWriter)Generates code to perform a CreateIndexOperation.
Protected methodGenerate(CreateTableOperation, IndentedTextWriter)Generates code to perform a CreateTableOperation.
Protected methodGenerate(DropColumnOperation, IndentedTextWriter)Generates code to perform a DropColumnOperation.
Protected methodGenerate(DropForeignKeyOperation, IndentedTextWriter)Generates code to perform a DropForeignKeyOperation.
Protected methodGenerate(DropIndexOperation, IndentedTextWriter)Generates code to perform a DropIndexOperation.
Protected methodGenerate(DropPrimaryKeyOperation, IndentedTextWriter)Generates code to perform a DropPrimaryKeyOperation.
Protected methodGenerate(DropTableOperation, IndentedTextWriter)Generates code to perform a DropTableOperation.
Protected methodGenerate(MoveTableOperation, IndentedTextWriter)Generates code to perform a MoveTableOperation.
Protected methodGenerate(RenameColumnOperation, IndentedTextWriter)Generates code to perform a RenameColumnOperation.
Protected methodGenerate(RenameTableOperation, IndentedTextWriter)Generates code to perform a RenameTableOperation.
Protected methodGenerate(SqlOperation, IndentedTextWriter)Generates code to perform a SqlOperation.
Protected methodGenerate(ColumnModel, IndentedTextWriter, Boolean)Generates code to specify the definition for a ColumnModel.
Protected methodGenerate(IEnumerable<MigrationOperation>, String, String)Generates the primary code file that the user can view and edit.
Protected methodGenerate(String, String, String, String, String)Generates the code behind file with migration metadata.
Public methodGenerate(String, IEnumerable<MigrationOperation>, String, String, String, String)Generates the code behind file with migration metadata. (Overrides MigrationCodeGenerator.Generate(String, IEnumerable<MigrationOperation>, String, String, String, String).)
Protected methodGenerateInline(AddForeignKeyOperation, IndentedTextWriter)Generates code to perform an AddForeignKeyOperation as part of a CreateTableOperation.
Protected methodGenerateInline(AddPrimaryKeyOperation, IndentedTextWriter)Generates code to perform an AddPrimaryKeyOperation as part of a CreateTableOperation.
Protected methodGenerateInline(CreateIndexOperation, IndentedTextWriter)Generates code to perform a CreateIndexOperation as part of a CreateTableOperation.
Protected methodGetDefaultNamespaces Gets the default namespaces that must be output as "using" or "Imports" directives for any code generated. (Inherited from MigrationCodeGenerator.)
Public methodGetHashCode (Inherited from Object.)
Protected methodGetNamespaces Gets the namespaces that must be output as "using" or "Imports" directives to handle the code generated by the given operations. (Inherited from MigrationCodeGenerator.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodQuoteQuotes an identifier using appropriate escaping to allow it to be stored in a string.
Protected methodScrubNameRemoves any invalid characters from the name of an database artifact.
Public methodToString (Inherited from Object.)
Protected methodTranslateColumnTypeGets the type name to use for a column of the given data type.
Protected methodWriteClassEndGenerates the closing code for a class that was started with WriteClassStart.
Protected methodWriteClassStartGenerates a namespace, using statements and class definition.
Protected methodWritePropertyGenerates a property to return the source or target model in the code behind file.
Top
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.