src/EntityFramework/Migrations/Design/CSharpMigrationCodeGenerator.cs
/// <summary>
/// Generates a property to return the source or target model in the code behind file.
/// </summary>
/// <param name="name"> Name of the property. </param>
/// <param name="value"> Value to be returned. </param>
/// <param name="writer"> Text writer to add the generated code to. </param>
Generates a property to return the source or target model in the code behind file.
Generates a property to return the source or target model in the code behind file .
protected virtual void WriteProperty(string name, string value, IndentedTextWriter writer)
        {
            Check.NotEmpty(name, "name");
            Check.NotNull(writer, "writer");
            writer.Write("string IMigrationMetadata.");
            writer.WriteLine(name);
            writer.WriteLine("{");
            writer.Indent++;
            writer.Write("get { return ");
            writer.Write(value ?? "null");
            writer.WriteLine("; }");
            writer.Indent--;
            writer.WriteLine("}");
        }
protected virtual void WriteProperty ( string name , string value , IndentedTextWriter writer ) { Check . NotEmpty ( name , " " ) ; Check . NotNull ( writer , " " ) ; writer . Write ( " " ) ; writer . WriteLine ( name ) ; writer . WriteLine ( " " ) ; writer . Indent ++ ; writer . Write ( " " ) ; writer . Write ( value ?? " " ) ; writer . WriteLine ( " " ) ; writer . Indent -- ; writer . WriteLine ( " " ) ; }
Generates a property to return the source or target model in the code behind file.
Generates a property to return the source or target model in the code behind file .
name
string
Name of the property.
Name of the property .
value
string
Value to be returned.
Value to be returned .
writer
IndentedTextWriter
Text writer to add the generated code to.
Text writer to add the generated code to .