Created
May 3, 2019 22:10
-
-
Save SafaElmali/aa1a97df0a31c3bf1d119dc78f1fe125 to your computer and use it in GitHub Desktop.
Migration file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.EntityFrameworkCore.Metadata; | |
using Microsoft.EntityFrameworkCore.Migrations; | |
namespace EFCore.Migrations | |
{ | |
public partial class FirstMigration : Migration | |
{ | |
protected override void Up(MigrationBuilder migrationBuilder) | |
{ | |
migrationBuilder.CreateTable( | |
name: "PRODUCT", | |
columns: table => new | |
{ | |
ID = table.Column<int>(nullable: false) | |
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), | |
NAME = table.Column<string>(nullable: true) | |
}, | |
constraints: table => | |
{ | |
table.PrimaryKey("PK_PRODUCT", x => x.ID); | |
}); | |
} | |
protected override void Down(MigrationBuilder migrationBuilder) | |
{ | |
migrationBuilder.DropTable( | |
name: "PRODUCT"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment