Asp.Net_Single_Page_App/Single_Page_Anwendung/Migrations/20220610054518_InitialCreate.Designer.cs

84 lines
3.1 KiB
C#
Raw Normal View History

// <auto-generated />
using Aps_Single_Page_Anwendung.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Single_Page_Anwendung.Migrations
{
[DbContext(typeof(FutterContext))]
2022-06-23 12:54:54 +02:00
[Migration("20220610054518_InitialCreate")]
partial class InitialCreate
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Aps_Single_Page_Anwendung.Models.Kategorie", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("Beschreibung")
.HasColumnType("nvarchar(255)")
.HasMaxLength(255);
b.Property<string>("Name")
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.HasKey("Id");
b.ToTable("Kategorien");
});
modelBuilder.Entity("Aps_Single_Page_Anwendung.Models.Speise", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("Beschreibung")
.HasColumnType("nvarchar(255)")
.HasMaxLength(255);
b.Property<int>("KategorieId")
.HasColumnType("int");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<double>("Preis")
.HasColumnType("float");
b.HasKey("Id");
b.HasIndex("KategorieId");
b.ToTable("Speisen");
});
modelBuilder.Entity("Aps_Single_Page_Anwendung.Models.Speise", b =>
{
b.HasOne("Aps_Single_Page_Anwendung.Models.Kategorie", "Kategorie")
.WithMany("Speisen")
.HasForeignKey("KategorieId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}