Fungerande version av skiktad lösning Winforms App med SQlite och entity framework

This commit is contained in:
2023-08-23 21:25:09 +02:00
parent 1f39c39d96
commit 40632aa92c
17 changed files with 485 additions and 6 deletions

View File

@ -0,0 +1,59 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WinFormDiApp.DAL.Migrations
{
/// <inheritdoc />
public partial class Initial : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AccountRecords",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
BetalDatum = table.Column<DateTime>(type: "TEXT", nullable: false),
Mottagare = table.Column<string>(type: "TEXT", nullable: false),
Konto = table.Column<string>(type: "TEXT", nullable: false),
Belopp = table.Column<double>(type: "REAL", nullable: false),
Avisering = table.Column<string>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AccountRecords", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Members",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
FirstName = table.Column<string>(type: "TEXT", nullable: false),
LastName = table.Column<string>(type: "TEXT", nullable: false),
NickName = table.Column<string>(type: "TEXT", nullable: false),
PersonType = table.Column<string>(type: "TEXT", nullable: false),
Email = table.Column<string>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Members", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AccountRecords");
migrationBuilder.DropTable(
name: "Members");
}
}
}