shopping-cart-blazor-wasm/Server/Migrations/StoreContextModelSnapshot.cs
2020-06-19 09:20:16 +01:00

76 lines
2.8 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using ShoppingCartStarter.Server.Data;
namespace ShoppingCartStarter.Server.Migrations
{
[DbContext(typeof(StoreContext))]
partial class StoreContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.5")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("ShoppingCartStarter.Server.DomainModels.LineItem", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("Image")
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,2)");
b.Property<int>("Quantity")
.HasColumnType("int");
b.Property<int?>("ShoppingCartId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ShoppingCartId");
b.ToTable("LineItem");
});
modelBuilder.Entity("ShoppingCartStarter.Server.DomainModels.ShoppingCart", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<int>("SessionId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("Carts");
});
modelBuilder.Entity("ShoppingCartStarter.Server.DomainModels.LineItem", b =>
{
b.HasOne("ShoppingCartStarter.Server.DomainModels.ShoppingCart", null)
.WithMany("LineItems")
.HasForeignKey("ShoppingCartId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}