// 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("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("Id") .ValueGeneratedOnAdd() .HasColumnType("int") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property("Beschreibung") .HasColumnType("nvarchar(255)") .HasMaxLength(255); b.Property("Name") .HasColumnType("nvarchar(100)") .HasMaxLength(100); b.HasKey("Id"); b.ToTable("Kategorien"); }); modelBuilder.Entity("Aps_Single_Page_Anwendung.Models.Speise", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property("Beschreibung") .HasColumnType("nvarchar(255)") .HasMaxLength(255); b.Property("KategorieId") .HasColumnType("int"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(100)") .HasMaxLength(100); b.Property("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 } } }