84 lines
3.1 KiB
C#
84 lines
3.1 KiB
C#
// <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))]
|
|
[Migration("20220607122417_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
|
|
}
|
|
}
|
|
}
|