aggiunto modello lingue

This commit is contained in:
zaccaria.majid
2023-04-04 11:07:16 +02:00
parent 8ef3a6978c
commit b410d4dd0c
6 changed files with 934 additions and 3 deletions
@@ -0,0 +1,40 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WebDoorCreator.Data.Migrations.WDCData
{
public partial class AddLanguagePack : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Languages",
columns: table => new
{
CodLingua = table.Column<string>(type: "nvarchar(5)", maxLength: 5, nullable: false),
DescrizioneLingua = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Languages", x => x.CodLingua);
});
migrationBuilder.InsertData(
table: "Languages",
columns: new[] { "CodLingua", "DescrizioneLingua" },
values: new object[] { "EN", "English" });
migrationBuilder.InsertData(
table: "Languages",
columns: new[] { "CodLingua", "DescrizioneLingua" },
values: new object[] { "IT", "Italiano" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Languages");
}
}
}