// using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using ThAmCo.Venues.Data; namespace ThAmCo.Catering.Migrations { [DbContext(typeof(CateringDbContext))] [Migration("20181204120817_InitialCreate")] partial class InitialCreate { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasDefaultSchema("thamco.catering") .HasAnnotation("ProductVersion", "2.1.1-rtm-30846") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("ThAmCo.Catering.Data.FoodBooking", b => { b.Property("Id"); b.Property("MenuId"); b.Property("Notes"); b.HasKey("Id"); b.ToTable("FoodBookings"); }); modelBuilder.Entity("ThAmCo.Catering.Data.Menu", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property("Items"); b.Property("Price"); b.HasKey("Id"); b.ToTable("Menus"); b.HasData( new { Id = 1, Items = "Chicken Pate, Chicken Roast, Chicken Cake", Price = 8.5 }, new { Id = 2, Items = "Toast, Cheese On Toast, Jam on Toast", Price = 7.5 }, new { Id = 3, Items = "Mac and Cheese, Alan's Special, Cheesecake", Price = 9.0 } ); }); modelBuilder.Entity("ThAmCo.Catering.Data.FoodBooking", b => { b.HasOne("ThAmCo.Catering.Data.Menu", "Menu") .WithMany("FoodBookings") .HasForeignKey("Id") .OnDelete(DeleteBehavior.Cascade); }); #pragma warning restore 612, 618 } } }