Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace UTourExample.API.Migrations
- {
- [DbContext(typeof(UTourContext))]
- partial class UTourContextModelSnapshot : ModelSnapshot
- {
- protected override void BuildModel(ModelBuilder modelBuilder)
- {
- modelBuilder
- .HasAnnotation("ProductVersion", "1.1.0-rtm-22752")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
- modelBuilder.Entity("UTourExample.API.Entities.Place", b =>
- {
- b.Property<int>("Id")
- .ValueGeneratedOnAdd()
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
- b.Property<string>("Description")
- .HasMaxLength(200);
- b.Property<string>("Name")
- .IsRequired()
- .HasMaxLength(100);
- b.Property<int>("TourId");
- b.HasKey("Id");
- b.HasIndex("TourId");
- b.ToTable("Places");
- });
- modelBuilder.Entity("UTourExample.API.Entities.Tour", b =>
- {
- b.Property<int>("Id")
- .ValueGeneratedOnAdd()
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
- b.Property<string>("Description")
- .HasMaxLength(200);
- b.Property<string>("Name")
- .IsRequired()
- .HasMaxLength(100);
- b.Property<int>("Status");
- b.HasKey("Id");
- b.ToTable("Tours");
- });
- modelBuilder.Entity("UTourExample.API.Entities.Place", b =>
- {
- b.HasOne("UTourExample.API.Entities.Tour", "Tour")
- .WithMany("Places")
- .HasForeignKey("TourId")
- .OnDelete(DeleteBehavior.Cascade);
- });
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement