Övergått till entity framework + lagt till ny tabell

This commit is contained in:
2025-09-02 15:07:21 +02:00
parent b04fc7e06e
commit ddb6719587
22 changed files with 1175 additions and 95 deletions

View File

@ -0,0 +1,70 @@
// <auto-generated />
using GreadyPoang.DataLayer.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace GreadyPoang.DataLayer.Migrations
{
[DbContext(typeof(DataContext))]
[Migration("20250901152226_initialCreate")]
partial class initialCreate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.8");
modelBuilder.Entity("GreadyPoang.EntityLayer.Participant", b =>
{
b.Property<int>("ParticipantId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("ParticipantId");
b.ToTable("Participants");
b.HasData(
new
{
ParticipantId = 1,
Email = "John.Doe@gmail.com",
FirstName = "John",
LastName = "Doe"
},
new
{
ParticipantId = 2,
Email = "jb@gmail.com",
FirstName = "Jane",
LastName = "Black"
},
new
{
ParticipantId = 3,
Email = "mw@gmail.com",
FirstName = "Mary",
LastName = "White"
});
});
#pragma warning restore 612, 618
}
}
}