You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
AspNetCoreLearnOfficial/WebAPIWithEF/Migrations/PizzaContextModelSnapshot.cs

120 lines
3.7 KiB

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using WebAPIWithEF.Data;
#nullable disable
namespace WebAPIWithEF.Migrations
{
[DbContext(typeof(PizzaContext))]
partial class PizzaContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.6");
modelBuilder.Entity("PizzaTopping", b =>
{
b.Property<int>("PizzasId")
.HasColumnType("INTEGER");
b.Property<int>("ToppingsId")
.HasColumnType("INTEGER");
b.HasKey("PizzasId", "ToppingsId");
b.HasIndex("ToppingsId");
b.ToTable("PizzaTopping");
});
modelBuilder.Entity("WebAPIWithEF.Models.Pizza", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<int?>("SauceId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("SauceId");
b.ToTable("Pizzas");
});
modelBuilder.Entity("WebAPIWithEF.Models.Sauce", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<bool>("IsVegan")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Sauces");
});
modelBuilder.Entity("WebAPIWithEF.Models.Topping", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<decimal>("Calories")
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Toppings");
});
modelBuilder.Entity("PizzaTopping", b =>
{
b.HasOne("WebAPIWithEF.Models.Pizza", null)
.WithMany()
.HasForeignKey("PizzasId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("WebAPIWithEF.Models.Topping", null)
.WithMany()
.HasForeignKey("ToppingsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("WebAPIWithEF.Models.Pizza", b =>
{
b.HasOne("WebAPIWithEF.Models.Sauce", "Sauce")
.WithMany()
.HasForeignKey("SauceId");
b.Navigation("Sauce");
});
#pragma warning restore 612, 618
}
}
}