From 636e62fbf8b400383c5f40d8eb03e2979f6f8022 Mon Sep 17 00:00:00 2001 From: bide45 <43629035+bide45@users.noreply.github.com> Date: Wed, 29 Jul 2020 23:49:11 +0930 Subject: [PATCH] Update managing.md (#2542) Aligned field name in code example with the description (e.g. Name to FullName). --- .../core/managing-schemas/migrations/managing.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/entity-framework/core/managing-schemas/migrations/managing.md b/entity-framework/core/managing-schemas/migrations/managing.md index 544beabf67..0a021f45e3 100644 --- a/entity-framework/core/managing-schemas/migrations/managing.md +++ b/entity-framework/core/managing-schemas/migrations/managing.md @@ -91,7 +91,7 @@ migrationBuilder.RenameColumn( ### Adding raw SQL -While renaming a column can be achieved via a built-in API, in many cases that is not possible. For example, we may want to replace existing `FirstName` and `LastColumn` properties with a single, new `FullName` property. The migration generated by EF Core will be the following: +While renaming a column can be achieved via a built-in API, in many cases that is not possible. For example, we may want to replace existing `FirstName` and `LastName` properties with a single, new `FullName` property. The migration generated by EF Core will be the following: ``` csharp migrationBuilder.DropColumn( @@ -103,7 +103,7 @@ migrationBuilder.DropColumn( table: "Customer"); migrationBuilder.AddColumn( - name: "Name", + name: "FullName", table: "Customer", nullable: true); ``` @@ -112,14 +112,14 @@ As before, this would cause unwanted data loss. To transfer the data from the ol ``` csharp migrationBuilder.AddColumn( - name: "Name", + name: "FullName", table: "Customer", nullable: true); migrationBuilder.Sql( @" UPDATE Customer - SET Name = FirstName + ' ' + LastName; + SET FullName = FirstName + ' ' + LastName; "); migrationBuilder.DropColumn(